Skip to main content

Crate s2mod_packer

Crate s2mod_packer 

Source
Expand description

.s2mod archive packing / unpacking.

.s2mod is a zip archive (or plain directory) containing converted assets and a manifest.toml.

§Example (compile-only, requires real paths at runtime)

ⓘ
use s2mod_packer::{S2ModPackage, ContentPackManifest};

// Pack a directory into a .s2mod zip archive
S2ModPackage::pack_to_zip("my_mod_dir", "output.s2mod").unwrap();

// Open an existing archive
let pack = S2ModPackage::open("pack.s2mod").unwrap();
println!("Pack: {}", pack.manifest().pack.name);

// Unpack an archive
S2ModPackage::unpack_to_dir("pack.s2mod", "output_dir").unwrap();

Re-exports§

pub use manifest::*;
pub use package::*;

Modules§

cli
manifest
Content Pack manifest types.
package
.s2mod package reading and writing.