Documentation / Rust

Use the filesystem contract directly.

The core crate exposes the observable contract. The loopback helper normalizes paths and forwards operations to an FsDriverwithout requiring a kernel mount.

Core crate / direct loopback access
use mount_rs::{Loopback, MemoryFs, MemoryOptions};

let fs = Loopback::new(MemoryFs::new(MemoryOptions::default()));
fs.write_file("/hello", b"hello").await?;
assert_eq!(fs.read_file("/hello").await?, b"hello");

The public contract

Core Rust API types
TypeRoleSource
FsDriverFilesystem-wide operations and capability reporting.driver.rs ↗
FileHandleRead, write, stat, truncate, sync, and close.driver.rs ↗
MetadataStoreLoad, lease, fenced publication, and metadata flush.storage.rs ↗
BlockStoreImmutable block put/get/delete and byte flush.storage.rs ↗

Split storage with fixed-size chunks

ChunkedFs composes independent stores. A write publishes block references only after new blocks are flushed; the chunker configuration is persisted with the namespace and file layout.

mount-rs-memory + mount-rs-chunked
use mount_rs_chunked::{ChunkedFs, ChunkedOptions};
use mount_rs_memory::{MemoryBlockStore, MemoryMetadataStore};

let fs = ChunkedFs::open(
    MemoryMetadataStore::new(),
    MemoryBlockStore::new(),
    ChunkedOptions::fixed("demo", 64 * 1024)?,
).await?;

fs.shutdown().await?; // release the provider writer lease
Durability is a capability, not an adjective.

Memory stores are intentionally volatile. Durable providers must implement their own flush and fencing semantics; this page does not turn a local round trip into crash or power-loss evidence.

Related source: ChunkedFs integration and chunking contract.