Rust crate for reading GameCube and Wii disc images
Go to file
Luke Street ce9fbbf822 Finish WIA/RVZ, add WBFS, CISO & more
Generally a complete overhaul.
2024-02-16 22:53:37 -07:00
.github/workflows More build fix attempts 2024-02-02 16:29:11 -07:00
src Finish WIA/RVZ, add WBFS, CISO & more 2024-02-16 22:53:37 -07:00
.gitignore Release 0.1.1: Improvements to windowed stream API, minor fixes 2021-08-23 16:51:05 -04:00
Cargo.toml Finish WIA/RVZ, add WBFS, CISO & more 2024-02-16 22:53:37 -07:00
LICENSE-APACHE Fix LICENSE copyright 2021-08-25 14:54:52 -04:00
LICENSE-MIT Fix LICENSE copyright 2021-08-25 14:54:52 -04:00
README.md Finish WIA/RVZ, add WBFS, CISO & more 2024-02-16 22:53:37 -07:00
build.rs Finish WIA/RVZ, add WBFS, CISO & more 2024-02-16 22:53:37 -07:00
deny.toml More build fix attempts 2024-02-02 16:29:11 -07:00
rustfmt.toml WIP WIA/RVZ & more 2024-02-02 16:21:05 -07:00

README.md

nod-rs Build Status Latest Version Api Rustdoc Rust Version

Library for traversing & reading GameCube and Wii disc images.

Originally based on the C++ library nod, but does not currently support authoring.

Currently supported file formats:

  • ISO (GCM)
  • WIA / RVZ
  • WBFS
  • CISO
  • NFS (Wii U VC)

CLI tool

This crate includes a command-line tool called nodtool.

info

Displays information about a disc image.

nodtool info /path/to/game.iso

extract

Extracts the contents of a disc image to a directory.

nodtool extract /path/to/game.iso [outdir]

For Wii U VC titles, use content/hif_000000.nfs:

nodtool extract /path/to/game/content/hif_000000.nfs [outdir]

convert

Converts any supported format to raw ISO.

nodtool convert /path/to/game.wia /path/to/game.iso

Library example

Opening a disc image and reading a file:

use std::io::Read;

use nod::{Disc, PartitionKind};

fn main() -> nod::Result<()> {
    let disc = Disc::new("path/to/file.iso")?;
    let mut partition = disc.open_partition_kind(PartitionKind::Data)?;
    let meta = partition.meta()?;
    let fst = meta.fst()?;
    if let Some((_, node)) = fst.find("/MP3/Worlds.txt") {
        let mut s = String::new();
        partition
            .open_file(node)
            .expect("Failed to open file stream")
            .read_to_string(&mut s)
            .expect("Failed to read file");
        println!("{}", s);
    }
    Ok(())
}

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.