Skip to main content

Module assets

Module assets 

Source
Expand description

Standalone compile-time embedded asset registry with deterministic FNV-1a64 fingerprinting, weak ETag (304 Not Modified), and RFC 8246 immutable caching (governed by web-platform-baseline.sot.md WP-CACHE-2).

Only fingerprinted URLs (/assets/<name>.<hash>.<ext> or /<name>.<hash>.<ext>) receive Cache-Control: public, max-age=31536000, immutable. Canonical unhashed URLs receive Cache-Control: no-cache so upgrades never serve stale assets.

Structs§

AssetRegistry
Extensible asset registry allowing v2.0 (e.g. Kinetic Graph assets) to mount additional embedded assets without modifying CORE_ASSETS.
EmbeddedAsset
A compile-time embedded static asset served by arks serve.

Constants§

CORE_ASSETS
Core shared Web UI assets embedded in both v1.0 and v2.0.

Functions§

core_asset_url
Return the fingerprinted URL for a core embedded asset, falling back to canonical_path if not registered in CORE_ASSETS.
core_assets
Return the default core asset slice.
core_manifest_hash
Combined manifest hash across all core assets (usable as a Service Worker cache version).
has_core_asset
Returns true if path matches a canonical or fingerprinted core embedded asset.
serve_core_asset
Serve a core embedded asset directly (usable in both single-repo and empty multi-repo roots).