Skip to main content

Crate hadris_cd

Crate hadris_cd 

Source
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::{CdWriter, CdOptions, 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 = CdOptions::with_volume_id("MY_DISC")
    .with_joliet();

CdWriter::new(file, options)
    .write(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

Re-exports§

pub use error::CdError;
pub use error::CdResult;
pub use layout::LayoutInfo;
pub use layout::LayoutManager;
pub use options::CdOptions;
pub use options::IsoOptions;
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
tree
Shared directory tree representation for hybrid ISO+UDF images