Expand description
§Hadris CD
A Rust library for creating hybrid ISO+UDF optical disc images.
§Overview
This crate creates “UDF Bridge” format images that contain both ISO 9660 and UDF filesystems. This provides maximum compatibility:
- Legacy systems read ISO 9660
- Modern systems read UDF
- Both filesystems share the same file data on disk
§Quick Start
use hadris_cd::{OpticalImageWriter, OpticalImageOptions, FileTree, FileEntry};
// Create a file tree
let mut tree = FileTree::new();
tree.add_file(FileEntry::from_buffer("readme.txt", b"Hello, World!".to_vec()));
// Create the hybrid image
let options = OpticalImageOptions::default()
.volume_id("MY_DISC")
.joliet(hadris_cd::JolietLevel::Level3);
let _file = OpticalImageWriter::new(file, options)
.finish(tree)
.unwrap();§Disk Layout
The UDF Bridge format interleaves ISO 9660 and UDF structures:
Sector 0-15: System area (boot code, partition tables)
Sector 16-...: ISO 9660 Volume Descriptors
Sector 17-19: UDF Volume Recognition Sequence (BEA01, NSR02, TEA01)
Sector 256: UDF Anchor Volume Descriptor Pointer
Sector 257+: UDF Volume Descriptor Sequence
File data: Shared between ISO and UDF (both point to same sectors)§Features
- ISO 9660 with Joliet (Windows long filenames) and Rock Ridge (POSIX)
- UDF 1.02/1.50/2.00+ support
- El-Torito bootable images
- Hybrid MBR+GPT for USB booting
Bridge output is continuously tested by opening the completed image through both the ISO 9660 and UDF readers.
Hybrid image creation currently uses the synchronous ISO and UDF writers.
This crate therefore exposes a sync-only writer API; std selects hosted
platform support, while the default feature set selects sync explicitly.
Re-exports§
pub use error::Error;pub use error::Result;pub use layout::LayoutInfo;pub use layout::LayoutManager;pub use options::IsoOptions;pub use options::OpticalImageOptions;pub use options::UdfOptions;pub use tree::Directory;pub use tree::FileData;pub use tree::FileEntry;pub use tree::FileExtent;pub use tree::FileTree;pub use sync::*;
Modules§
- error
- Error types for hadris-cd
- layout
- Sector layout and allocation for hybrid CD/DVD images
- options
- Configuration options for hybrid CD/DVD image creation
- sync
- Synchronous hybrid optical-image writer API.
- tree
- Shared directory tree representation for hybrid ISO+UDF images
Enums§
- Joliet
Level - Identifies a JolietLevel value.