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.
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");
}- Extraction logic borrowed from extract_xcode.py
- XAR parsing using apple-xar