Skip to main content

lamfold_erofs/
lib.rs

1//! # lamfold-erofs — the EROFS frontend of the lamfold read-only media stack.
2//!
3//! Clean-room EROFS (Enhanced Read-Only File System) reader. EROFS is the
4//! forward standard for immutable images — the metadata format **composefs**
5//! builds on for content-addressed OS and OCI images — so this frontend is where
6//! the lamfold stack meets the shepherd: read the metadata here, anchor trust in
7//! [`lamfold`]'s native fs-verity Merkle (`the lamfold design spec` §7).
8//!
9//! Reads over a lamfold [`lamfold::BlockSource`] and implements
10//! [`lamfold::FoldFrontend`]; with a [`lamfold::MerkleVerifier`] in the
11//! [`lamfold::SubstrateCtx`] the read path verifies every data block against the
12//! trusted leaf layer and refuses tampered media.
13//!
14//! Scope: the **uncompressed** read path — superblock, compact + extended
15//! inodes, the `FLAT_PLAIN` and `FLAT_INLINE` data layouts, directory blocks,
16//! and symlinks. Deferred: compressed clusters (lz4/lzma/zstd/deflate — the
17//! second stage), chunk-based files, xattrs, and the shared-xattr area.
18//!
19//! Derived only from the public EROFS on-disk format — the kernel header
20//! `fs/erofs/erofs_fs.h` is itself **SPDX MIT**, so it is referenced directly;
21//! the GPL-2 `fs/erofs` *driver* is fenced off (never read or copied).
22
23#![cfg_attr(not(any(test, feature = "std")), no_std)]
24#![forbid(unsafe_code)]
25
26extern crate alloc;
27
28mod erofs;
29
30pub use erofs::Erofs;