haz_vfs/lib.rs
1//! Filesystem port used by every filesystem-touching crate in
2//! `haz`.
3//!
4//! `haz-vfs` is the hexagonal port: it defines the [`Filesystem`]
5//! trait, its supporting value types, and the [`FsError`] variant
6//! set every implementation produces. The production implementation
7//! [`StdFilesystem`] ships with the crate; an in-memory
8//! implementation for tests lives in the `haz-vfs-testing` crate.
9//!
10//! - [`StdFilesystem`] for production code. Delegates straight to
11//! [`std::fs`] and inherits the host platform's symlink, depth-cap,
12//! and canonicalisation semantics.
13//!
14//! Consumers (`haz-discovery`, `haz-cache`, `haz-exec`) borrow a
15//! `Filesystem` implementation generically rather than depending on
16//! a concrete impl.
17
18#![deny(missing_docs)]
19
20pub mod std_impl;
21pub mod traits;
22
23pub use std_impl::{StdCanonicalPath, StdFilesystem};
24pub use traits::{DirEntry, EntryKind, Filesystem, FsError, FsMetadata, WritableFilesystem};