ext4-mkfs

Crates.ioext4-mkfs
lib.rsext4-mkfs
version0.1.0
created_at2026-01-25 19:41:39.145107+00
updated_at2026-01-25 19:41:39.145107+00
descriptionPure Rust library for creating ext2/ext3/ext4 filesystems
homepage
repositoryhttps://github.com/AprilNEA/ext4-mkfs
max_upload_size
id2069400
size29,398
AprilNEA (AprilNEA)

documentation

README

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

Commit count: 4

cargo fmt