Skip to main content

Module assets

Module assets 

Source
Expand description

Static assets embedded in the binary (the self-hosted UI makes no outside requests).

Each asset is served under a content-hashed name (/assets/app.3f2a1b9c.css) with a one-year immutable cache, so a deploy never serves a stale stylesheet. CSS, JS and SVG are gzip-compressed once, the first time any asset is asked for.

Structs§

Asset
Assets

Functions§

serve
GET /assets/{file}
url
The hashed URL of an embedded asset, for templates: {{ crate::assets::url("app.css") }}.