lamexfat 0.1.0

no_std read-only exFAT reader for UEFI bootloaders (removable media)
Documentation
// SPDX-License-Identifier: MIT OR Apache-2.0
//! `lamexfat` — a `no_std` + `alloc` **read-only** exFAT filesystem reader for
//! UEFI bootloaders.
//!
//! exFAT is never on the UEFI ESP (always FAT32 by spec), so `lamexfat` serves
//! **removable/utility media** — reading a kernel + initrd or a boot image off an
//! exFAT-formatted USB stick or SD card, including the `> 4 GiB` payloads FAT32
//! cannot hold. The public surface mirrors `lamxfs::Xfs` / the `lam*` family, so a
//! bootloader `FsBackend` adapter is a one-for-one mirror of the others.
//!
//! Read-only by construction: there is no write path, allocator, or bitmap
//! mutation. Every on-disk count/offset/cluster-chain is bounds- and
//! cycle-checked, and [`ExFat::read`] caps its allocation at [`MAX_FILE_BYTES`]
//! so a hostile `DataLength` cannot drive a denial-of-boot.
//!
//! Clean-room status: the on-disk parsing is adapted from `exfat-slim`
//! (`github.com/ninjasource/exfat-slim`, Apache-2.0) — see `NOTICE` and the
//! per-file headers. New code is `MIT OR Apache-2.0`.

#![cfg_attr(not(test), no_std)]
#![cfg_attr(docsrs, feature(doc_cfg))]
#![forbid(unsafe_code)]

extern crate alloc;

mod block_read;
mod dir;
mod error;
mod exfat;
mod fat;
mod file;
mod name;
mod path;
mod resolve;
mod upcase;
mod vbr;

pub use block_read::BlockRead;
pub use error::{Error, VbrReason};
pub use exfat::{DirEntry, EntryKind, ExFat, Metadata, MAX_FILE_BYTES};
pub use path::Path;