Expand description
UI render asset conveniences (Image/SVG caches and upload helpers).
This crate provides small caching layers for common UI render assets (images, SVGs) so components can avoid repeated decode/raster/upload work across frames.
This is an ecosystem crate: it composes higher-level policies on top of the core runtime services. See ADR 0106.
URL image note:
ImageSource::from_url(...)is a direct helper for URL-backed image loads on every platform.- For logical asset requests (
resolve_image_source*), the shared image bridge can now consume resolver-providedAssetExternalReference::Urlon every platform. - The shipped desktop host still does not install a first-party default URL resolver; desktop apps must opt in with a custom resolver if they want URL assets.
- On Web/WASM, any
ImageSource::Urlnow uses the browser’s image loader/decoder before readback into RGBA for GPU upload, so direct URL helpers and resolver-provided URL references avoid the oldfetch bytes + Rust decodelane. - The remaining first-party web limitation is the bytes-resolved logical-asset path:
when no resolver layer returns
AssetExternalReference::Url, the UI asset bridge still falls back toResolvedAssetBytesand Rust-side decode, which can cost more CPU and memory than a browser-native decode path on image-heavy surfaces.
Re-exports§
pub use asset_resolver::*;pub use image_asset_cache::*;pub use image_source::*;pub use image_upload::*;pub use svg_asset_cache::*;pub use ui_assets::*;
Modules§
- asset_
resolver - image_
asset_ cache - image_
asset_ state - image_
source - Ecosystem-level
img(source)helpers: decode/load +ImageAssetCacheintegration. - image_
upload - svg_
asset_ cache - svg_
asset_ state - ui_
assets