# ext4-mkfs
Pure Rust library for creating ext2/ext3/ext4 filesystems, powered by [lwext4](https://github.com/gkostka/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
```rust
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
```bash
git clone --recurse-submodules https://github.com/user/ext4-mkfs
cd ext4-mkfs
cargo build --release
```
## License
MIT OR Apache-2.0