#assets #tar #zstd #loader #bevy #directory #file

bevy_assets_tar_zstd

Asset loader using .tar.zstd

1 unstable release

0.1.0 Jan 2, 2023

#1968 in Game dev

MIT license

11KB
251 lines

bevy_assets_tar_zstd

This package is for packaging assets in bevy in a tar.zstd file at compile-time.

Automatically package assets

Package assets in the assets directory in the assets.tar.zstd file at built-time:

fn main() {
    bevy_assets_tar_zstd_bundler::bundle_asset(bevy_assets_tar_zstd_bundler::Config::default());
}

Add asset loader

App::new()
    .add_plugin(bevy_assets_tar_zstd::AssetsTarZstdPlugin::default())

lib.rs:

A bevy AssetIo implementation that allows reading from tar files, that are zstd compressed.

Use the crate bevy_assets_tar_zstd_bundler to bundle the assets in an folder at build time.

Example:

bevy_assets_tar_zstd_bundler::bundle_asset(bevy_assets_tar_zstd_bundler::Config::default());

This will read assets from the assets folder an write them into ./target/assets.bin.

Dependencies

~20–39MB
~623K SLoC