Skip to main content

Crate rustio_admin_assets

Crate rustio_admin_assets 

Source
Expand description

Embedded admin templates for rustio-admin.

This crate is the single owner of the admin panel’s template bytes. They are baked into the binary via include_str! at compile time — single-binary deploy is a hard constraint of the framework.

Two crates consume this:

The crate is deliberately std-only and dependency-free. It carries a low MSRV so the lightweight parts of the CLI can depend on it without pulling in — or inheriting the Rust version of — the runtime stack (sqlx, tokio, hyper). A disk-side override still wins at render time; that lookup lives in the runtime, not here. This crate only owns the defaults.

Constants§

EMBEDDED_TEMPLATES
Every template baked into the framework binary, by canonical name (e.g. "admin/list.html"). Order is stable across builds so a CLI verb that lists them produces deterministic output. The runtime iterates this to build its loader and to validate project overrides; embedded_template_names and embedded_template_source are the name/lookup views over it.

Functions§

embedded_template_names
Every embedded template name, by canonical path (e.g. "admin/list.html"). Order matches EMBEDDED_TEMPLATES and is stable across builds so rustio-admin override enumerates copy candidates deterministically; project code can also iterate this to build documentation pages.
embedded_template_source
Return the byte-for-byte source of an embedded template by name, or None when no such template exists. Used by rustio-admin override to materialise a copy at <RUSTIO_TEMPLATE_DIR>/<name> so the operator can start editing without first having to find the framework source.