Rustelo

Modular · Type-Safe · Configuration-Driven · Memory-Safe

Full-Stack Rust Web Framework

Build. Deploy. Deliver.

Modular, type-safe Rust platform built on Leptos and Axum. Configuration-driven architecture with language-agnostic routing, plugin system, and dual-target WASM+native compilation.

21
Crates
3
Layers
0
unsafe blocks
2
Targets WASM+native

ARCHITECTURE

Three-Layer Design

Clear separation between your application, framework ports, and foundation. Each layer has a single responsibility.

Your App

Implementation Layer

Your application crates: server (Axum SSR), client (Leptos WASM), and pages (Leptos components). Build-time code generation produces routes, pages, and i18n from configuration.

website-serverwebsite-clientwebsite-pages
PORTS

Framework Ports

Stable public API for implementations. Ports wrap foundation internals and expose clean, versioned interfaces: web stack, authentication, and content management.

rustelo_webrustelo_authrustelo_content
FOUNDATION

Foundation

Core implementations: config, i18n, RBAC, Axum SSR server, Leptos WASM client, UI components, page generation system, and Nickel-based build configuration.

rustelo_core_librustelo_serverrustelo_clientrustelo_componentsrustelo_pagesbuild-config
Rustelo architecture diagram

FEATURES

Everything Included

A complete platform from authentication to deployment, composable via Cargo features.

⚛️

Reactive WASM Frontend

Fine-grained reactivity with Leptos. Signals, memos, effects. Zero virtual DOM. SSR hydration with tachys.

🔒

Authentication & RBAC

JWT, OAuth2, 2FA with TOTP. Role-based access control via Nickel NCL policies. Argon2 password hashing.

🌍

Language-Agnostic Routing

Routes defined in TOML/NCL. Build-time generation. No hardcoded paths. Auto-discover languages from content directory.

🔌

Plugin System

ResourceContributor and PageContributor traits. Register at startup, zero runtime overhead. include_str!() for compile-time embedding.

🗄️

Database Abstraction

PostgreSQL and SQLite via SQLx. Compile-time query verification. Async connection pooling. Separate migrations per database type.

📧

Email & Notifications

Multi-provider email system via Lettre. Template-based emails with FTL i18n. WebSocket real-time notifications via tokio-tungstenite.

🔧

Build-Time Code Generation

Nickel NCL → build.rs → OUT_DIR → include!(). Routes, pages, menus, and FTL registry generated at compile time. Zero runtime cost.

📦

Cargo Feature Composition

auth, content-db, content-static, email, tls, metrics, crypto. Enable only what you need. Feature-gated compilation for both WASM and native targets.

CARGO FEATURES

authcontent-dbcontent-staticemailtlsmetricscryptomarkdown

BUILD PIPELINE

Configuration-Driven Generation

Everything generated at compile time from Nickel NCL configuration. Zero runtime overhead, full type safety.

site/config/*.ncl
Nickel schema config
build.rs
Cargo build script
OUT_DIR
routes.rs · pages.rs · menus.rs
include!()
Macro inclusion
Binary
Zero-cost · Type-safe · Inlined

QUICK START

Up and Running

From zero to running Rustelo application.

terminal
# 1. Create new project
$ cargo rustelo new my-webapp --features auth,content-db,email

# 2. Configure environment
$ cd my-webapp && cp .env.example .env
$ source .env

# 3. Start dev server
$ just dev

# 4. Quality checks
$ just quality  # fmt + clippy -D warnings + tests

# 5. Production build
$ just build-prod

TECH STACK

Built on Proven Foundations

Leptos
Reactive WASM frontend
Axum
Async HTTP server
SQLx
Compile-time SQL · PostgreSQL + SQLite
Tokio
Async runtime
Nickel NCL
Configuration language + RBAC schemas
Fluent / FTL
i18n — embedded at compile time
UnoCSS
Atomic CSS + DaisyUI preset
tower-http
CORS · security headers · tracing
Syntect
Syntax highlighting for code blocks
Argon2
Password hashing · OWASP compliant
tokio-tungstenite
WebSocket real-time
thiserror
Typed error propagation

Ready to build with Rust?

Open source · Self-hosted · Zero unsafe · 100% Rust