unxip_rs
September 12, 2025 ยท View on GitHub
A library for extracting .xip files, written in Rust.
Note that it uses the cpio command. You can specify a custom path to cpio if needed. Many cpio extractors have been tested and only GNU cpio works.
Usage
fn main() {
let mut file = File::open("./Xcode_16.3.xip").unwrap();
let res = unxip(&mut file, &PathBuf::from("./output"), None /* Uses "cpio" from PATH */);
if let Err(e) = res {
eprintln!("{}", e);
}
println!("Done");
}
Credits
- Extraction logic borrowed from extract_xcode.py
- XAR parsing using apple-xar