Routing & HTTP
Typed handlers, extractors, middleware, validation, sessions, CSRF, and rate limiting. The compiler checks the wiring.
A full-stack framework for Rust
dust is a batteries-included web framework built on Axum and Tokio: routing, database, queues, mail, views, and realtime monitoring in one coherent stack. No Node.js, no build step, one binary.
curl -fsSL https://dustapp.dev/install.sh | sh
Linux · macOS · Windows via PowerShell · MIT licensed
The whole stack
The pieces a real application needs, built to work together and documented in full. Add a crate when you want one; the defaults are ready on the first run.
Typed handlers, extractors, middleware, validation, sessions, CSRF, and rate limiting. The compiler checks the wiring.
A query builder, migrations, models, and relations over SQLite, PostgreSQL, and MySQL, with one API across them.
Queues with retries, a scheduler, workflows, and a supervisor that keeps workers and cron alive.
Mailers and templates, plus notifications over mail, SMS, and Slack — queued when you want them to be.
A first-party dashboard over SSE for requests, CPU, memory, storage, alerts, and incidents.
MiniJinja templates and the io/ui component library. No bundler, no Node.js, no hydration step.
A closer look
Four layers, one language. Pick a layer to see the code you actually write.
Declare the route once. Extractors parse the path, query, body, and session into the types your handler asks for — a bad parameter is a 404, not a panic.
route! builds links from handlersfn web(route: &mut Router) {
route.get("/posts/{post}", posts::show);
}
pub async fn show(
Params(id): Params<u64>,
) -> dust::Result<View> {
let post = Post::find(id).await?.or_abort(404)?;
Ok(view("posts.show", data! { post => post }))
}
Models, migrations, and relations over SQLite, PostgreSQL, and MySQL. The same code runs on each; the driver is configuration.
let posts = Post::query()
.filter(Post::published_at.is_not_null())
.order_by(Post::published_at.desc())
.paginate(15)
.await?;
let post = Post::find(42).await?
.or_abort(404)?;
Dispatch a job and return. Retries, batches, second-level schedules, and durable workflows stay in the same application.
ProcessPodcast { podcast }.dispatch().await?;
#[schedule::tasks]
fn schedule(schedule: &mut Schedule) {
schedule.command("reports:generate")
.daily_at("08:00");
}
Dispatch an event once. Listeners send the mail and broadcast the update; Relay gives you a local WebSocket server and an Echo client.
#[derive(Event)]
#[event(broadcast(private = "orders.{order_id}"))]
pub struct OrderShipped {
pub order_id: i64,
pub tracking_number: String,
}
OrderShipped {
order_id: 42,
tracking_number: "TRACK-123".into(),
}
.dispatch()
.await?;
Concurrency
Built on Tokio and Axum, every handler runs asynchronously on a non-blocking runtime. Independent calls run together, and work the response doesn't need finishes in the background with the application's context and tracing intact.
Execute independent database queries or HTTP calls in parallel with task::try_join!, so a page only waits on its slowest call.
use dust::db;
use dust::prelude::*;
use dust::task;
use serde_json::{json, Value};
pub async fn show() -> dust::Result<Json<Value>> {
let (users, orders) = task::try_join!(
db::table("users").count(),
db::table("orders").count(),
)?;
Ok(Json(json!({ "users": users, "orders": orders })))
}
Hand off webhooks or follow-up work to task::background and return immediately, with context, tracing, and graceful shutdown handled for you.
use dust::http::client;
use dust::prelude::*;
use dust::task;
use serde_json::json;
pub async fn ship(Params(id): Params<u64>) -> dust::Result<Redirect> {
task::background(async move {
client::post("https://example.com/webhooks/shipped")
.json(json!({ "order_id": id }))
.ensure_successful()
.await?;
Ok(())
})?;
Ok(Redirect::back())
}
Included, not bolted on
A cron daemon, a typed pipeline engine, durable workflows, a supervisor, modules, media, search, and feature flags — all first-party.
Due commands run in their own processes. Every run records its exit code, output, CPU time, and peak memory.
Each stage receives the value and a Next continuation. Change it, pass it on, or stop early — then test every stage on its own.
Steps execute once and resume across sleeps, webhooks, and restarts.
Workers and cron restart in their own processes, with status and statistics.
Routes, migrations, views, and services in modules/, enabled per application.
Store, collect, and generate resized or cropped versions on any disk.
Post::search("rust") over a database index or an external engine.
Resolve a value per user or team once, store it, and roll it out without a deploy.
Real-time
Broadcast an event once and every subscribed browser receives it over a WebSocket. Channels are authorized like routes, delivery goes through your queue, and Relay runs the server on your machine.
Private and presence channels are checked by your authorization rules before anyone subscribes. The event itself is plain Rust.
use dust::event::Event;
#[derive(Event)]
#[event(broadcast(private = "orders.{order_id}"))]
pub struct OrderShipped {
pub order_id: i64,
pub tracking_number: String,
}
OrderShipped {
order_id: 42,
tracking_number: "TRACK-123".into(),
}
.dispatch()
.await?;
Views & UI
Jinja templates render inside the binary and escape output by default. io/ui ships the app shell, forms, tables, and overlays as one stylesheet and one ES module.
Views take typed data from Rust and render in the same process. Layouts, includes, components, and fragments are built in.
{% extends "layouts.app" %}
{% block content %}
<article class="card">
<h1>{{ post.title }}</h1>
<p>{{ post.excerpt }}</p>
<a class="btn btn-primary"
href="/posts/{{ post.id }}">Read more</a>
</article>
{% endblock %}
First-party module
Requests, latency, CPU, memory, storage, mail, queues, and incidents, streamed over SSE into one dashboard. Open it while the application runs.
Typed at the edge
Request payloads become typed structs with rules and an authorization check. Tests send real requests through the whole stack.
Rules run before the handler. Invalid input returns to the form with its errors, or becomes a structured JSON error for an API client.
use dust::model::create;
use dust::prelude::*;
use crate::models::Post;
#[dust::input(fills = Post)]
#[validate(anyone)]
pub struct StorePost {
#[validate(required, max_length(255))]
pub title: String,
#[validate(required)]
pub body: String,
}
pub async fn store(
Valid(form): Valid<StorePost>,
) -> dust::Result<Redirect> {
let post = create!(Post { ..form }).await?;
Ok(redirect!(show, post.id))
}
Requests go through the full middleware, routing, and handler stack without binding a network port.
use dust::testing::prelude::*;
#[dust::test]
async fn the_feed_lists_posts(app: Application) {
app.get("/posts")
.await
.assert_ok()
.assert_see("Latest posts");
}
#[dust::test]
async fn an_empty_title_is_rejected(app: Application) {
app.post("/posts")
.form([("title", "")])
.await
.assert_invalid(&["title"]);
}
Batteries included
Routing, models, queues, workflows, broadcasting, mail, storage, search, and the tools around them. Every area has a written guide with runnable examples.
Built for agents
Every application ships AGENTS.md and the complete guides for its installed framework version in storage/docs. An agent gets the conventions, the commands, and the real API instead of a guess.
AGENTS.mddust docs:install refreshes bothFAQ
No. Views render with MiniJinja inside the binary, and io/ui is one stylesheet and one ES module. There is no bundler, no node_modules, and no hydration step.
SQLite, PostgreSQL, and MySQL or MariaDB, behind one schema, query, and model API. Enable the driver you need with a Cargo feature; the code around it stays the same.
dust is pre-1.0. Pin the exact version in Cargo.toml and expect breaking changes between minor releases. The demo application on this site runs on the same binary you build.
dust build --release produces one binary. Run it under systemd; the supervisor keeps queue workers, cron, and other programs alive. The deployment guide walks through the rest.
Yes. dust is a normal Rust crate. Add dependencies, write your own modules under modules/, or reach the internal crates through the public façade.
dust is MIT licensed. Pulse and the other demo modules are published separately on the module registry.
Create an application and have routing, database, queues, mail, views, and monitoring ready on the first run.
curl -fsSL https://dustapp.dev/install.sh | sh