9 unstable releases (3 breaking)

0.4.0 Jan 23, 2024
0.3.0 Oct 8, 2023
0.1.2 Jun 21, 2023
0.0.3 Dec 7, 2022
0.0.0 Sep 19, 2017

#496 in Game dev

38 downloads per month

MIT/Apache

205KB
4.5K SLoC

.pak Asset Crate

Crates.io Docs.rs

.pak Configuration File

Each asset package is "baked" from a configuration source file. Example:

Rust code

PakBuf::bake("game_art.toml", "game_art.pak")?;

game_art.toml

[content]
compression = 'snap'

[[content.group]]
assets = [
    'bitmap/**/*.png',
    'font/**/*.toml',
    'model/**/*.toml',
    'sound/**/*.ogg',
    'music/*.mp3',
    'ui/*.png',
]

Note:

Additional [[content.group]] tables may be appended. All groups are added to the package and these individual groups are not distinct entities in the runtime file.

[content] Schema

Item Description
compression May be omitted, 'snap' or 'x'

3D Models

Example:

[model]
src = "some_file.gltf"

[model] Schema

Item Description
src File path to the .gltf or .glb model file. May be relative to the [model] TOML file or absolute where the root is the same folder as the [content] TOML file.

Tests

Run tests with all features in order to include the baking code:

cargo test --all-features

Dependencies

~36MB
~572K SLoC