Expand description
Asset I/O and decoding services.
Re-exports§
pub use decoders::*;
Modules§
- decoders
- Concrete
AssetDecoderimplementations: bytes → typed asset.
Structs§
- Asset
Change Event - One filesystem change against an asset under the watched root.
- Asset
IdRegistry - Maps forward-slash relative asset paths to their frozen [
AssetUUID]. - Asset
Service - The asset management service.
- Asset
Watcher - Drains filesystem-change events under a project’s
assets/directory. - Decoder
Registration - Inventory entry for an
AssetDecoderthat wants to be auto-registered against anAssetServiceat startup. - Decoder
Registry - Registry of asset decoders, keyed by type name.
- File
Loader - File-based asset loader for editor/development mode.
- Index
Builder - Recursive scanner that turns a project’s
assets/directory into anAssetMetadatalist ready for the VFS. - Manifest
Entry - One row of
manifest.bin— pre-computed integrity record. - Pack
Builder - Builds a release pack from a project’s
assets/directory. - Pack
Header - Decoded form of the 24-byte header at the start of
data.pack. - Pack
Loader - Pack-based asset loader for release mode.
- Pack
Manifest - In-memory manifest for fast
verify(uuid, &bytes)lookups. - Pack
Output - Output of a successful
PackBuilder::build.
Enums§
- Asset
Change Kind - What kind of change happened to an asset on disk.
- Pack
Progress - One step of a pack build, suitable for driving a UI progress bar.
Constants§
- EXTENSIONLESS_
ASSET_ TYPE - Asset type assigned to files with no extension at all. These still enter the VFS so they’re visible in the asset browser, but the engine has no way to dispatch a decoder until the user renames or re-classifies them.
- PACK_
FLAG_ LZ4 - Bit flag — at least one entry in this pack uses LZ4 compression.
Diagnostics-only: per-entry compression is decided by
AssetSource::Packed.compression. The flag is set when the writer applied LZ4 to any entry, so a quick header scan can tell whether the pack as a whole is mostly compressed. - PACK_
FLAG_ MANIFEST - Bit flag — a
manifest.binBLAKE3 sidecar accompanies this pack. (Set byPackBuilderwhen integrity manifest emission is enabled.) - PACK_
FORMAT_ VERSION - Current pack format version. Bumped when the on-disk layout changes in a non-additive way; older runtimes refuse newer packs by reading the version from the header.
- PACK_
HEADER_ SIZE - Total size in bytes of the leading
PackHeaderindata.pack. Asset offsets recorded inindex.binare relative to the start of the asset region, not to byte 0 —PackLoaderadds this constant when seeking. - PACK_
MAGIC - 8-byte magic prefix that identifies a Khora pack archive on disk.
- REGISTRY_
DIR - Project-root subdirectory that holds engine-authored project metadata.
- REGISTRY_
FILE - File name of the asset-identity registry inside
REGISTRY_DIR.
Traits§
- Asset
Decoder - A trait for types that can decode a specific kind of asset from raw bytes.
- AssetIo
- Trait for asset I/O backends (file system or pack archive).
- Asset
Writer - Sibling trait to
AssetIofor editor-time writing of assets back to storage. Implemented only bycrate::asset::FileLoader— release builds (PackLoader) are intentionally read-only, which is whyAssetWriterlives separately rather than extendingAssetIo.
Functions§
- asset_
type_ for_ extension - Returns the canonical asset type name for a file extension.
- extract_
dependencies - Extracts the direct asset dependencies encoded in
bytes, dispatching on the canonicalasset_typename. - should_
skip_ file trueif a file with the given name should be excluded from the VFS scan and from hot-reload events. Catches OS scratch files (.DS_Store,.gitkeep, …) and editor swap / backup files (*.tmp,*.swp,*.bak,*~).- type_
has_ dependency_ extractor trueifextract_dependenciescan extract references from this asset type, i.e. the type has a real extractor rather than the empty fallback.