Open Source › LamBoot filesystem crates › lamexfat
lamexfat
Read-only exFAT for SD cards and USB sticks, including files over 4 GiB. No dependencies.
What lamexfat is for
lamexfat reads the exFAT on-disk format (boot region, FAT, cluster heap, directory entry sets, up-case table) over a byte source, so a bootloader can find a kernel and initramfs on exFAT removable media, including the files over 4 GiB that FAT32 can't hold.
It has no dependencies at all. Read-only by construction.
Basis: Vendors the parsing core of exfat-slim (Apache-2.0), a clean-room reader, not GPL kernel or userspace source. Those four files stay Apache-2.0 only; the rest is MIT OR Apache-2.0.
Add it to your crate
[dependencies]
lamexfat = "0.1"
Or cargo add lamexfat. On Debian unstable or testing, the packaged crate is librust-lamexfat-dev (rust-lamexfat). Debian packages 0.1.0; crates.io has the later releases.
What it reads
| Feature | Status |
|---|---|
| Files and directories through FAT chains and contiguous (NoFatChain) allocations | Read, honoring ValidDataLength |
| Directory entry sets | Every set's checksum verified |
| Case-insensitive lookups | Through the volume's whole up-case table, compressed or not, so names outside ASCII match |
| A damaged main boot region | Read from the backup boot region |
What it refuses
- File system revisions other than 1.x
- TexFAT (two FATs)
Each is a typed error, and every allocation a hostile DataLength could drive is capped.
What it depends on, and what it doesn't
Avoids: Every dependency: The crate depends on nothing, not even for checksums or Unicode case folding.
Always
None. lamexfat builds with no required dependencies.
Only with a feature
None.
Cargo features
| Feature | Default | What it adds |
|---|---|---|
| std | No | An std::error::Error impl for Error |
How it's tested
Fixtures are volumes exfatprogs formatted and the Linux exFAT driver wrote, so every file must hash to what the kernel wrote; fuzz targets in fuzz/.
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 other disk filesystem readers
Read-only media formats (lamfold): lamfold · lamfold-iso · lamfold-udf · lamfold-squash · lamfold-erofs · lamfold-cramfs · lamfold-romfs · lamfold-cpio