Open Source › LamBoot filesystem crates › lamfold

lamfold

The substrate under seven read-only media formats: codecs, block cache, bounded parsing, fs-verity.

Reads Media filesystem substrate | v0.1.5 | MIT OR Apache-2.0 | Rust 1.87+ | no_std | 1 required dependency
OVERVIEW

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.

INSTALL

Add it to your crate

# Cargo.toml
[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).

CAPABILITIES

What it reads

FeatureStatus
Codec registrydeflate, lz4, zstd, xz and lzo, each behind a feature
Immutable-block cacheShared by every frontend
Bounded zero-copy parsingWith a read cap on every allocation
FoldFrontend traitWhat each format crate implements
The shepherdA Verifier seam with a native fs-verity Merkle verifier
DEPENDENCIES

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

Cargo features

FeatureDefaultWhat it adds
stdYesstd support
verifyYesThe fs-verity verifier, through sha2
codec-deflate, codec-lz4, codec-zstd, codec-xz, codec-lzoYesEach codec
TESTING

How it's tested

Substrate and shepherd unit tests; each frontend is tested against images from its format's own tools.

WHY IT EXISTS

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