Skip to main content

mars_agents/platform/
mod.rs

1//! Platform boundary for Windows/POSIX-sensitive operations.
2//!
3//! This module centralizes platform-specific behavior so runtime code can import
4//! from `crate::platform` rather than scattering `#[cfg]` branches.
5//!
6//! Boundary rule: use `crate::platform` for
7//! - Filesystem-safe name generation from external identifiers
8//! - Global cache root resolution
9//! - Cross-process file locks
10//! - Durable file writes (atomic writes)
11//! - Generated directory replacement and cache publication
12//! - External process invocation (git)
13//!
14//! What stays direct: PathBuf joins under resolved roots, fs::read/read_dir,
15//! config reads, content hashing, domain validation in SourceSubpath.
16
17pub mod cache;
18pub mod fs;
19pub mod lock;
20pub mod path_syntax;
21pub mod process;
22
23// Re-export commonly used items at the platform level
24pub use cache::{global_cache_root, safe_component, safe_component_with_hash};
25pub use fs::{atomic_install_dir, atomic_install_dir_filtered, atomic_write};
26pub use lock::FileLock;