THE FRAMEWORK
What sits underneath the declaration
A set of Rust crates in three layers, composed through Cargo features and driven by the same Nickel configuration a site is written in.
Capabilities
Build-time code generation
site/config/*.ncl → build.rs → OUT_DIR → include!(): routes, pages, menus and the FTL registry are generated at compile time and are read-only output.
Two rendering profiles
HtmxSsr renders Minijinja templates server-side with HTMX for interaction and no WebAssembly; LeptosHydration ships Leptos SSR with WASM hydration. Selected per route, per workspace or by default.
Authentication and RBAC
JWT, OAuth2 and two-factor TOTP, Argon2 password hashing, role-based access control with policies in Nickel, and security headers through tower-http.
Compile-time plugins
ResourceContributor and PageContributor traits contribute themes, menus, translations and pages, registered at startup with no runtime plugin loader.
SEO in every profile
A render-mode-agnostic SEO layer: meta tags, Open Graph, Twitter cards, canonical and hreflang links, JSON-LD, sitemap and robots.
Cargo feature composition
auth, content-db, content-static, email, tls, metrics, crypto and markdown are features: a build compiles only what the site enables, for both WASM and native targets.
Three layers
Each layer has a single responsibility, and an implementation reaches the foundation only through the ports.
Your application
The implementation layer: the server, the client and the pages of one site, with routes, pages and i18n generated from its configuration.
Framework ports
A stable public API that wraps the foundation: rustelo_web for the web stack, rustelo_auth for authentication and authorization, rustelo_content for content management.
Foundation
The core implementations: configuration, i18n, RBAC, the Axum server, the Leptos client, components, page generation and the Nickel build configuration.
Crates
The crates the layers are made of.
- rustelo_web
- Web stack umbrella port over the foundation.
- rustelo_auth
- Authentication and authorization port.
- rustelo_content
- Content management port.
- rustelo_server
- The Axum server: SSR, middleware, auth, database, email.
- rustelo_core_lib
- Core runtime types: configuration, i18n, registration.
- rustelo_routing
- Routing with language support.
- rustelo_config
- Configuration loading from Nickel and TOML.
- rustelo_seo
- SEO layer for every rendering profile.
- rustelo_pages_htmx
- Minijinja page renderers for HTMX-SSR.
- rustelo_components_htmx
- UI components for HTMX-SSR.
- rustelo_client
- The Leptos WASM client for hydration.
- rustelo_components_leptos
- UI components for Leptos hydration.
- rustelo_cli
- Cargo subcommand for project management.
Technology
- Rust
- Leptos
- Axum
- HTMX
- Minijinja
- Tokio
- SQLx
- PostgreSQL
- SQLite
- Nickel
- Fluent
- tower-http
- Syntect
- Argon2
- UnoCSS
Start from the declaration
Read what Rustelo is and the concepts it is built on, or ask about using it for your site.