Expand description
ext4rs — pure-Rust ext4 filesystem driver.
Exposes a stable C ABI (fs_ext4_*) via capi so FFI consumers
(Swift/C/Go/…) can link libfs_ext4.a and #include "fs_ext4.h".
Architecture (read-only Phase 1):
block_io— abstract trait for reading device blockssuperblock— parse + validate the on-disk superblockfeatures— feature flag inventory (COMPAT/INCOMPAT/RO_COMPAT)bgd— block group descriptor parsinginode— inode + extra fields parsingextent— extent tree traversal (leaf/internal nodes, uninitialized extents)dir— directory entries (linear and HTree)hash— htree hash functions (legacy / half_md4 / tea)fs— top-level filesystem handle, file/dir lookup, read APIcapi— C ABI exports matchinginclude/fs_ext4.h
Re-exports§
pub use error::Error;pub use error::Result;pub use fs::Filesystem;pub use superblock::Superblock;
Modules§
- acl
- POSIX ACL decoder for ext4’s compact on-disk ACL format.
- alloc
- Block + inode bitmap allocator — planning layer.
- bgd
- Block group descriptor (BGD) parsing.
- block_
cache - Buffer cache wrapping a
BlockDevice. - block_
io - Abstract block-device I/O.
- capi
- C ABI exports — MUST match
include/fs_ext4.hexactly. Consumers linklibfs_ext4.aand #include that header; any signature change here requires the header to change in lockstep. - casefold
- Case-folded directory lookup (E12, Phase 5).
- checksum
- Metadata checksum verification (RO_COMPAT_METADATA_CSUM).
- dir
- Linear directory entry parsing.
- ea_
inode - EA_INODE xattr value follow (E12, Phase 5).
- error
- Errors returned by the ext4rs driver.
- extent
- Extent tree traversal.
- extent_
mut - Extent tree mutation — planning layer (E7).
- features
- ext4 feature flags — COMPAT, INCOMPAT, RO_COMPAT.
- file_io
- Read file (or directory) contents using extent traversal.
- file_
mut - File-write high-level planner (E10).
- fs
- Top-level filesystem handle. Composes block_io + superblock + bgd + inode + extent + dir.
- fs_
core_ bridge - Bidirectional bridge between ext4’s local
BlockDevicetrait and the sharedfs_core::BlockDevicetrait. - fsck
- Read-only filesystem audit — a small subset of
ext4 audit tool -n. - hash
- HTree hash functions for indexed directory lookup.
- htree
- HTree (hash tree) directory lookup.
- htree_
mut - Htree rebalance — planning layer (E9).
- indirect
- Legacy direct + indirect block-pointer scheme used by ext2 and ext3
file inodes (and by ext4 inodes whose
EXT4_EXTENTS_FLis unset). - indirect_
mut - Mutation primitives for the legacy direct/indirect block-pointer scheme used by ext2 / ext3 (and ext4 inodes that opt out of extents).
- inline_
data - Inline data reading.
- inode
- ext4 inode parsing.
- jbd2
- JBD2 journal superblock parser.
- journal
- JBD2 transaction walker — read-only replay-plan producer.
- journal_
apply - JBD2 journal replay applier.
- journal_
writer - JBD2 live-write side: serialize a transaction, write it to the journal inode, then apply the writes to their final fs locations and mark the journal clean.
- mkfs
- ext4 filesystem creation (mkfs).
- path
- Path-to-inode resolution.
- superblock
- ext4 superblock parsing.
- transaction
- JBD2 transaction writer (E11).
- verify
- In-tree structural verifier for ext2 / ext3 / ext4 volumes.
- xattr
- Extended attribute (xattr) reading.