ext4-mkfs 0.1.0

Pure Rust library for creating ext2/ext3/ext4 filesystems
Documentation
  • Coverage
  • 95.56%
    43 out of 45 items documented2 out of 25 items with examples
  • Size
  • Source code size: 29.39 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 812.67 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 27s Average build duration of successful builds.
  • all releases: 27s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • AprilNEA

ext4-mkfs

Pure Rust library for creating ext2/ext3/ext4 filesystems, powered by lwext4.

Features

  • Zero runtime dependencies (lwext4 statically linked)
  • Support for ext2, ext3, and ext4 filesystems
  • Configurable block size, volume label, UUID, journaling
  • Generic BlockDevice trait for custom backends
  • Built-in IoBlockDevice for files and memory buffers

Usage

use ext4_mkfs::{mkfs, MkfsConfig, IoBlockDevice, FsType};
use std::fs::OpenOptions;

let file = OpenOptions::new()
    .read(true)
    .write(true)
    .open("disk.img")?;

let device = IoBlockDevice::new(file, 512, 100 * 1024 * 1024);

mkfs(device, MkfsConfig::new()
    .fs_type(FsType::Ext4)
    .block_size(4096)
    .label("my_volume"))?;

Building

git clone --recurse-submodules https://github.com/user/ext4-mkfs
cd ext4-mkfs
cargo build --release

License

MIT OR Apache-2.0