Skip to main content

Crate bootsmith_core

Crate bootsmith_core 

Source
Expand description

bootsmith-core: the typed pipeline that turns an ISO + a target device into a sequence of write operations.

This crate is intentionally OS-agnostic. Concrete device I/O lives in bootsmith-disk; ISO inspection in bootsmith-iso; boot-record bytes in bootsmith-boot. The orchestration here calls into those via traits so the pipeline can run against an in-memory Vec<u8> for unit tests just as easily as against /dev/rdisk8.

Re-exports§

pub use device::Device;
pub use plan::BootMode;
pub use plan::WritePlan;

Modules§

device
The Device trait: the only abstraction every other crate is allowed to use when it needs to write to “a thing.” The macOS raw-block-device impl lives in bootsmith-disk; in tests we substitute an in-memory Vec<u8> impl so cargo test works without root, without a USB stick, and without macOS.
plan
WritePlan is the typed, fully-resolved description of “what we are going to do to this device.” Building a plan is deterministic and pure; executing it is the only step that needs a real Device.

Structs§

Config
Top-level config built from CLI args.
UnattendedConfig

Enums§

BootRecordImpl
Backend used to write MBR boot code and the partition boot record.
Error
ModeRequest
What the user asked for at the CLI. Auto triggers ISO inspection to pick the actual BootMode.

Type Aliases§

Result