Expand description
ferrosys — pure-Rust, userspace filesystem tooling.
The crate creates and reads filesystem images entirely in userspace, over ordinary byte streams, in self-contained, safe Rust. On-disk types serialize through explicit little-endian byte accessors, so the byte layout is spelled out at every field.
§Structure
The crate root holds the family-agnostic substrate — the vocabulary a detector and a scan speak, independent of which family answers them:
detectreads an image and reports theFilesystemfamily it holds, anddetect_withdoes the same at an offset within the source, for a partition or a region a carver located;DetectErrortells an unreadable source from an unrecognized one.crc32cis the reflected CRC-32C primitive filesystem metadata checksums are built from. Theextmodule implements the ext2/ext3/ext4 family — theformatwriter, theReaderopened over anyRead + Seeksource, theTreeBuildersource, and the byte-exact on-disk structures — and is on by default. Its images are byte-reproducible: the UUID, hash seed, and timestamps are inputs, never read from the clock or a random source.
§Features
ext is on by default and is the whole filesystem surface. Three more are off by
default, so a build that wants none of them depends only on thiserror:
taradds the tar/PAX archive source and sink: a filesystem built from an archive, and one written back out as one. It depends ontar.diradds the host-directory source: a filesystem built by walking a tree on this machine, with its modes, ownership, times, hard links, special files, and extended attributes. It depends onrustixfor the two extended-attribute calls the standard library has no equivalent of, and is present on Linux.serdeaddsSerializeto the scan taxonomy, the planned geometry, and the feature model, for embedding them in a document of your own. It depends onserde.
Modules§
- ext
- The ext2/ext3/ext4 family: the formatter, the reader, and the byte-exact on-disk structures.
Structs§
- Detect
Options - Where to look for a filesystem, and anything else detection needs to be told.
Enums§
- Detect
Error - A failure detecting the filesystem in an image.
- Filesystem
- The filesystem family an image holds, as
detectclassifies it.
Functions§
- crc32c
- crc32c of
data, continued fromseed. - detect
- Detect the filesystem family at the start of an image.
- detect_
with - Detect the filesystem family an image holds under
options.