Open Source › LamBoot filesystem crates › lamexfat

lamexfat

Read-only exFAT for SD cards and USB sticks, including files over 4 GiB. No dependencies.

Reads exFAT | v0.1.2 | (MIT OR Apache-2.0) AND Apache-2.0 | Rust 1.85+ | no_std | No required dependencies
OVERVIEW

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.

INSTALL

Add it to your crate

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

CAPABILITIES

What it reads

FeatureStatus
Files and directories through FAT chains and contiguous (NoFatChain) allocationsRead, honoring ValidDataLength
Directory entry setsEvery set's checksum verified
Case-insensitive lookupsThrough the volume's whole up-case table, compressed or not, so names outside ASCII match
A damaged main boot regionRead 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.

DEPENDENCIES

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

FeatureDefaultWhat it adds
stdNoAn std::error::Error impl for Error
TESTING

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/.

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