Open Source › LamBoot filesystem crates › lamfold
lamfold
The substrate under seven read-only media formats: codecs, block cache, bounded parsing, fs-verity.
What lamfold is for
lamfold is the shared core of LamBoot's read-only media stack. Each format frontend is a thin crate that contains only its on-disk structure parsing; codecs, caching, bounded parsing and verification all come from here. That keeps each frontend small and lets every format share one audited decompression and integrity path.
Frontends compose recursively: An ISO inside a partition, or the SquashFS root inside that ISO, reads through the same interface. The name is a sheepfold, the enclosure holding the flock of formats.
Basis: A metacrate workspace (one repository, one crate per format), with one pinned, all-permissive dependency set and no copyleft in the tree.
Add it to your crate
[dependencies]
lamfold = { version = "0.1", default-features = false, features = ["codec-zstd"] }
Or cargo add lamfold. On Debian unstable or testing, the packaged crate is librust-lamfold-dev (rust-lamfold).
What it reads
| Feature | Status |
|---|---|
| Codec registry | deflate, lz4, zstd, xz and lzo, each behind a feature |
| Immutable-block cache | Shared by every frontend |
| Bounded zero-copy parsing | With a read cap on every allocation |
| FoldFrontend trait | What each format crate implements |
| The shepherd | A Verifier seam with a native fs-verity Merkle verifier |
What it depends on, and what it doesn't
Avoids: GPL decompressors and filesystem code. Every codec is a permissive Rust crate, and with its features off only zerocopy remains.
Always
- zerocopy 0.8.27: Bounded zero-copy parsing
Only with a feature
- miniz_oxide 0.9.1, with
codec-deflate - lz4_flex 0.13, with
codec-lz4 - ruzstd 0.9.1, with
codec-zstd - lzma-rust2 0.19, with
codec-xz - lzokay 2.0.1, with
codec-lzo - sha2 0.11, with
verify
Cargo features
| Feature | Default | What it adds |
|---|---|---|
| std | Yes | std support |
| verify | Yes | The fs-verity verifier, through sha2 |
| codec-deflate, codec-lz4, codec-zstd, codec-xz, codec-lzo | Yes | Each codec |
How it's tested
Substrate and shepherd unit tests; each frontend is tested against images from its format's own tools.
No GPL drivers in the boot path
Until 2026 LamBoot read most Linux filesystems through about a dozen prebuilt UEFI filesystem driver binaries from the EfiFs (GPL-3.0) and rEFInd (GPL-2.0) projects. Three things ruled them out at once. Debian's free-software guidelines and Fedora's packaging rules reject a prebuilt .efi blob that isn't built from source in the archive. Microsoft doesn't sign GPLv3 code for Secure Boot, and loading a separate UEFI driver binary removes the ShimLock protocol that shim 15.8 relies on. And GPL binaries sit badly beside a permissively licensed loader. These crates replace those drivers with readers compiled into LamBoot itself. The whole family · LamBoot
The lamfold stack
Disk filesystems: lamxfs · lambutter · lamlvm · lamzfs · lamexfat · lamfat