erofs-rs-0.2.0 has been yanked.
erofs-rs
A pure Rust library for reading and building EROFS (Enhanced Read-Only File System) images.
Note: This library aims to provide essential parsing and building capabilities for common use cases, not a full reimplementation of erofs-utils.
Features
- no_std support with
allocfor embedded systems - Zero-copy parsing via mmap (std) or byte slices (no_std)
- Directory traversal and file reading
- Multiple data layouts: flat plain, flat inline, chunk-based
Usage
Standard (with std)
use Read;
use ;
no_std (with alloc)
extern crate alloc;
use ;
Feature Flags
std(default): Enables standard library support, including mmap backend- Without
std: Operates inno_stdmode withalloc
# Standard usage (default)
[]
= "0.1"
# no_std with alloc
[]
= { = "0.1", = false }
CLI
# Dump superblock info
# List directory
# Read file content
# Convert to tar
Status
Implemented
- Superblock / inode / dirent parsing
- Flat plain layout
- Flat inline layout
- Chunk-based layout (without chunk indexes)
- Directory walk (
walk_dir) - Convert to tar archive
TODO
- Extended attributes
- Compressed data (lz4, lzma, deflate)
- Image building (
mkfs.erofsequivalent)
License
MIT OR Apache-2.0