Hadris ISO
A comprehensive Rust implementation of the ISO 9660 filesystem with support for Joliet, Rock Ridge (RRIP), SUSP, El-Torito booting, and no-std environments.
Features
- Read & Write Support - Full-featured ISO creation and extraction
- No-std Compatible - Use in bootloaders and custom kernels
- El-Torito Boot - Create bootable CD/DVD images for BIOS systems
- Joliet Extension - UTF-16 Unicode filenames (up to 64 characters)
- Rock Ridge (RRIP) Extension - POSIX filesystem semantics (long names, permissions, symlinks)
- SUSP (System Use Sharing Protocol) - Standardized extension framework
- ISO 9660:1999 - Long filenames up to 207 characters with proper Level 2/3 compliance
Quick Start
Reading an ISO
use File;
use BufReader;
use IsoImage;
let file = open?;
let reader = new;
let image = open?;
// Iterate through root directory
let root = image.root_dir;
for entry in root.iter.entries
Creating a Bootable ISO
use Cursor;
use Arc;
use ;
use EmulationType;
use PathSeparator;
use ;
use ;
// Prepare files
let files = InputFiles ;
// Configure boot options
let boot_options = BootOptions ;
// Create ISO
let format_options = FormatOptions ;
let mut buffer = new;
format_new?;
Feature Flags
| Feature | Description | Dependencies |
|---|---|---|
read |
Minimal read support (no-std, no-alloc) | None |
alloc |
Heap allocation without full std | alloc crate |
std |
Full standard library support | std, alloc |
write |
ISO creation/formatting | std, alloc |
joliet |
UTF-16 Unicode filename support | alloc |
For Bootloaders (minimal footprint)
[]
= { = "0.2", = false, = ["read"] }
For Kernels with Heap (no-std + alloc)
[]
= { = "0.2", = false, = ["read", "alloc"] }
For Desktop Applications (full features)
[]
= { = "0.2" } # Uses default features
Extension Support
| Extension | Read | Write | Notes |
|---|---|---|---|
| ISO 9660 Level 1-3 | Yes | Yes | 8.3 to 31 character filenames, proper truncation handling |
| ISO 9660:1999 | Yes | Yes | Long filenames up to 207 chars (Level 2/3 compliance) |
| SUSP | Yes | Yes | System Use Sharing Protocol for extension framework |
| Joliet | Yes | Yes | UTF-16 BE, up to 64 characters |
| Rock Ridge (RRIP) | Yes | Yes | POSIX semantics, symlinks, uses SUSP |
| El-Torito | Yes | Yes | BIOS bootable images |
| Hybrid Boot (MBR/GPT) | - | Yes | USB bootable images (MBR, GPT, or dual) |
Comparison with Other Tools
| Feature | hadris-iso | cdfs | iso9660-rs | xorriso |
|---|---|---|---|---|
| Read | Yes | Yes | Yes | Yes |
| Write | Yes | No | No | Yes |
| No-std | Yes | No | No | No |
| El-Torito | Yes | No | No | Yes |
| Rock Ridge | Yes | Yes | Partial | Yes |
| Joliet | Yes | Yes | Yes | Yes |
| Language | Rust | Rust | Rust | C |
Examples
Run the examples with:
# Read an ISO and display its contents
# Extract files from an ISO
# Create a bootable ISO
Compatibility
ISOs created with this crate are compatible with:
- Linux (
mount,isoinfo,xorriso) - Windows (built-in ISO support)
- macOS (built-in ISO support)
- QEMU/VirtualBox (bootable ISOs)
Specification References
- ECMA-119 (ISO 9660)
- IEEE P1281 (System Use Sharing Protocol / SUSP)
- IEEE P1282 (Rock Ridge Interchange Protocol / RRIP)
- Joliet Specification (Microsoft)
- El-Torito Bootable CD-ROM Format Specification
License
This project is licensed under the MIT license.