Skip to main content

Module platform

Module platform 

Source
Expand description

Platform boundary for Windows/POSIX-sensitive operations.

This module centralizes platform-specific behavior so runtime code can import from crate::platform rather than scattering #[cfg] branches.

Boundary rule: use crate::platform for

  • Filesystem-safe name generation from external identifiers
  • Global cache root resolution
  • Cross-process file locks
  • Durable file writes (atomic writes)
  • Generated directory replacement and cache publication
  • External process invocation (git)

What stays direct: PathBuf joins under resolved roots, fs::read/read_dir, config reads, content hashing, domain validation in SourceSubpath.

Re-exports§

pub use cache::global_cache_root;
pub use cache::safe_component;
pub use cache::safe_component_with_hash;
pub use fs::atomic_install_dir;
pub use fs::atomic_install_dir_filtered;
pub use fs::atomic_write;
pub use lock::FileLock;

Modules§

cache
Cache directory naming and root resolution.
fs
Atomic filesystem operations for durable writes and directory replacement.
lock
Cross-process file locking.
path_syntax
Source string syntax classification.
process
External process invocation.