Rust crate for reading GameCube and Wii disc images
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Luke Street 50f171dcf5 Fix resolving NFS key path on Windows 1 year ago
.github/workflows Bump MSRV all the way to Rust 1.51 (thanks libraries) 1 year ago
src Fix resolving NFS key path on Windows 1 year ago
.gitignore Release 0.1.1: Improvements to windowed stream API, minor fixes 1 year ago
Cargo.toml Release 0.1.1: Improvements to windowed stream API, minor fixes 1 year ago
LICENSE-APACHE Fix LICENSE copyright 1 year ago
LICENSE-MIT Fix LICENSE copyright 1 year ago
README.md Release 0.1.1: Improvements to windowed stream API, minor fixes 1 year ago
deny.toml Add deny.toml for cargo-deny 1 year ago
rustfmt.toml Reformat with rustfmt 1 year ago

README.md

nod-rs Build Status Latest Version Api Rustdoc Rust Version

Library for traversing & reading GameCube and Wii disc images.

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

Currently supported file formats:

  • ISO
  • NFS (Wii U VC files, e.g. hif_000000.nfs)

CLI tool

This crate includes a CLI tool nodtool, which can be used to extract disc images to a specified directory:

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

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

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

Library example

Opening a disc image and reading a file:

use nod::disc::{new_disc_base, PartHeader};
use nod::fst::NodeType;
use nod::io::new_disc_io;
use std::io::Read;

let mut disc_io = new_disc_io("path/to/file".as_ref())?;
let disc_base = new_disc_base(disc_io.as_mut())?;
let mut partition = disc_base.get_data_partition(disc_io.as_mut())?;
let header = partition.read_header()?;
if let Some(NodeType::File(node)) = header.find_node("/MP3/Worlds.txt") {
    let mut s = String::new();
    partition.begin_file_stream(node)?.read_to_string(&mut s);
    println!(s);
}

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.