#nintendo #archive #zelda #game #sarc

nightly sarc-rs

A simple to use library for parsing and creating Nintendo SARC files in Rust

7 releases (1 stable)

1.0.0 Jul 17, 2022
0.1.5 May 20, 2021
0.1.3 Apr 15, 2021

#1074 in Game dev

GPL-3.0-or-later

5.5MB
642 lines

SARC library for Rust

crates.io api license

A simple to use library for parsing and creating Nintendo SARC files in Rust. Uses zero allocation parsing and handles file alignment requirements for common formats and games like The Legend of Zelda: Breath of the Wild. This library is a port of the SARC implementation from the oead library.

Sample usage:

use sarc_rs::{Sarc, SarcWriter};
let data = std::fs::read("test/Dungeon119.pack").unwrap();
let sarc = Sarc::new(&data).unwrap(); // Read a SARC from binary data
for file in sarc.files() { // Iterate files in SARC
    if let Some(name) = file.name {
       println!("File name: {}", name); // Print file name
    }
    println!("File size: {}", file.data.len()); // Print data size
}

Dependencies