kaish-vfs 0.17.0

kaish VFS contract: the Filesystem trait and the LocalFs/MemoryFs backends
Documentation
//! kaish's virtual filesystem contract.
//!
//! This leaf crate holds the [`Filesystem`] trait every VFS backend implements
//! and the `LocalFs` real-filesystem backend. It exists so backends that
//! aren't part of the kernel can live in their own crates without depending on
//! `kaish-kernel`.
//!
//! `DirEntry`/`DirEntryKind` (the data the trait traffics in) live one layer
//! down in `kaish-types` and are re-exported here for convenience.

mod budget;
mod dev;
mod traits;

pub use budget::ByteBudget;
pub use dev::DevFs;
pub use traits::{
    refuse_absolute_target, DirEntry, DirEntryKind, EffectiveAccess, Filesystem, PathAccess,
    ReadRange,
};

mod resolve;
pub use resolve::{resolve_beneath, Follow};

// `LocalFs` pulls in `tokio/fs`; gated so the in-memory/wasm sandbox build
// (which doesn't enable `localfs`) stays free of a real-filesystem dependency.
#[cfg(feature = "localfs")]
mod local;
#[cfg(feature = "localfs")]
pub use local::LocalFs;

// `MemoryFs` only needs `tokio/sync` (runtime-free), but gated so the bare
// trait-only build stays dependency-free.
#[cfg(feature = "memory")]
mod memory;
#[cfg(feature = "memory")]
pub use memory::MemoryFs;

// Copy-on-write overlay: writes land in an upper layer, the lower is never
// touched. Design: docs/kaish-overlayfs.md.
#[cfg(feature = "overlay")]
mod overlay;
#[cfg(feature = "overlay")]
pub use overlay::{ChangeKind, OverlayChange, OverlayFs};

#[cfg(any(feature = "memory", feature = "overlay"))]
mod paths;

// Cross-backend symlink cases every backend can run against itself. Also
// compiled under `cfg(test)` so this crate's own suite exercises it.
#[cfg(any(test, feature = "conformance"))]
pub mod conformance;