Skip to content

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

Notifications You must be signed in to change notification settings

AprilNEA/ext4-mkfs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages