ra2-mix 0.0.2

Red Alert 2 MIX file format library for reading and writing MIX archives
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! Basic example of using RA2 MIX library

use ra2_mix::{Ra2Error, MixPackage};
use std::path::Path;

fn main() -> Result<(), Ra2Error> {
    // Load a MIX file
    let mix = MixPackage::load(Path::new("example.mix"))?;
    
    // Print all files in the archive
    println!("Files in MIX archive:");
    for (filename, _) in mix.files.iter() {
        println!("- {}", filename);
    }
    
    Ok(())
}