Expand description
Admin UI template engine.
Stage 2 scaffolding for the 0.10.0 admin rebuild. The admin is rendered
by minijinja against templates shipped at
rustio-core/assets/templates/, bundled into the binary via
include_str!. User projects may override any template by placing a
file of the same relative path under their project’s templates/
directory — the loader chain is filesystem-first, embedded-fallback.
Stage 4a onwards consumes env() — the process-wide
Arc<Environment> shared by every admin handler.
Structs§
- Templating
Config - Runtime configuration for the admin template environment.
Constants§
- BUNDLED_
ASSETS - Framework CSS/JS served under
/admin/static/…. The tuples are(path_under_admin_static, content_type, bytes). As of 0.11.x the admin no longer ships Bootstrap — the design system lives inadmin.css, compiled at build time bybuild.rsfrom the Tailwind v4 source atassets/static/admin.css. The compiled bytes land inOUT_DIR/admin.cssand are inlined here viainclude_bytes!.
Functions§
- env
- Process-wide admin template environment. Built once on first
access from
TemplatingConfig::default(); auto-reload is enabled underdebug_assertions, so template edits are picked up without a restart in development. - environment
- Construct a fresh
minijinja::Environmentwith the framework’s embedded templates pre-registered and an optional filesystem override root. Callers typically wrap the result inArcand cache it.