Skip to main content

hd_mount/
lib.rs

1//! # hd-mount
2//!
3//! FUSE filesystem projection from a Merkle DAG for hyperdocker.
4//!
5//! This crate implements a virtual filesystem layer that projects content from
6//! the CAS store through the Merkle DAG into a mount point. It uses FUSE to
7//! present a read-only view of the environment's files, with overlay support
8//! for writable layers.
9//!
10//! ## Key Types
11//!
12//! - [`ProjectedFs`] - Projects DAG nodes as filesystem entries
13//! - [`Overlay`] - Writable overlay on top of the projected filesystem
14//! - [`FuseFs`] - FUSE filesystem implementation
15//! - [`MountManager`] - Manages mount/unmount lifecycle
16//! - [`MountHandle`] - Handle to an active mount point
17//!
18//! ## Example
19//!
20//! ```no_run
21//! use hd_mount::MountManager;
22//! use std::path::Path;
23//!
24//! let manager = MountManager::new(
25//!     Path::new("/tmp/cas"),
26//!     Path::new("/tmp/mnt"),
27//! ).unwrap();
28//! let handle = manager.mount().unwrap();
29//! // filesystem is now projected at /tmp/mnt
30//! ```
31
32pub mod projected;
33pub mod overlay;
34pub mod fuse;
35pub mod manager;
36
37pub use projected::ProjectedFs;
38pub use overlay::Overlay;
39pub use fuse::FuseFs;
40pub use manager::{MountManager, MountHandle, MountState};