fret-ui-assets 0.1.0

UI render asset loading/caching helpers for Fret (images, SVGs, and resource registries).
Documentation

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-provided AssetExternalReference::Url on 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::Url now 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 old fetch bytes + Rust decode lane.
  • 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 to ResolvedAssetBytes and Rust-side decode, which can cost more CPU and memory than a browser-native decode path on image-heavy surfaces.