Skip to main content

Module source

Module source 

Source
Expand description

Where an asset’s bytes come from before a loader sees them.

A source answers “do you have this path?” with bytes or nothing. The server asks each source in turn on the main thread, before the load is handed to a worker; a path no source claims is read from disk by the loader itself. Bundled apps work because BundleSource is installed by default, and an app that keeps its assets somewhere else (embedded in the binary, a download cache) registers its own with crate::AssetServer::register_source.

Structs§

BundleSource
The built-in source: bytes served out of registered .lpak bundles.
SourceReader
A detached reader over the server’s byte sources, for code that needs raw bytes away from the ECS: the bundles, then every registered AssetSource, then the filesystem. Kind-agnostic - no decoder runs and no cache is touched - so any plugin or runtime module that loads its own data (media files, archives, anything it ships with the app) reads through the same chain the asset pipeline uses instead of the raw filesystem.

Traits§

AssetSource
Resolves a requested path to bytes, or declines it.