Skip to main content

Crate fstool

Crate fstool 

Source
Expand description

fstool — build disk images and filesystems from a directory tree and TOML spec.

The crate is organised as a stack of three trait-based layers:

  • blockBlockDevice: raw seekable byte storage. Backends include on-disk files, in-memory buffers (for tests), and sub-range slices used to give each partition an isolated view.
  • partPartitionTable: MBR and GPT. (Coming in P2.)
  • fsFilesystem: ext2/3/4 in v1; FAT32 deferred. (Coming in P3+.)

High-level entry points for building or inspecting an image live at the crate root once P5 lands.

Re-exports§

pub use error::Error;
pub use error::Result;

Modules§

block
Block-device abstraction — the bottom layer of the fstool stack.
compression
Compression / decompression codecs.
error
Error type and Result alias for the crate.
fs
Filesystem layer — the Filesystem trait and shared types.
inspect
Unified read-side API: probe an image, identify the filesystem on it, and expose a small inspection surface (list / cat / info) that the CLI can drive without knowing which filesystem it’s talking to.
merge
Layered source merging with whiteout / opaque-dir semantics.
part
Partition-table layer.
repack
Repack — copy file trees from one source into a freshly-formatted destination filesystem.
spec
TOML image-specification schema and the build driver.