mbr-core
Pure-Rust, read-only Master Boot Record (MBR) parser. Decodes the on-disk
structures — the 512-byte boot sector, the four primary partition entries,
Extended Boot Record (EBR) chains, CHS/LBA geometry, GPT and VBR
cross-validation primitives, boot-code identity, and filesystem
fingerprints — with no I/O beyond a caller-supplied Read + Seek.
This crate is the structure-decode layer. It deliberately contains no
anomaly findings: the forensic analyzer that turns these structures into
graded observations lives in the sibling mbr-forensic crate, which
re-exports every type here.
use mbr::parse_mbr_sector;
// Pure parsing from a 512-byte buffer (no I/O required):
let buf = [0u8; 512];
let sector = parse_mbr_sector(&buf)?;
# Ok::<(), mbr::Error>(())