A full-stack framework for Rust

The whole stack.
One binary.

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

21framework crates
75written guides
3SQL drivers
0JavaScript build steps

The whole stack

Everything you reach for, already wired.

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.

Routing & HTTP

Typed handlers, extractors, middleware, validation, sessions, CSRF, and rate limiting. The compiler checks the wiring.

Database & models

A query builder, migrations, models, and relations over SQLite, PostgreSQL, and MySQL, with one API across them.

Background work

Queues with retries, a scheduler, workflows, and a supervisor that keeps workers and cron alive.

Mail & notifications

Mailers and templates, plus notifications over mail, SMS, and Slack — queued when you want them to be.

Realtime Pulse

A first-party dashboard over SSE for requests, CPU, memory, storage, alerts, and incidents.

Views & UI

MiniJinja templates and the io/ui component library. No bundler, no Node.js, no hydration step.

A closer look

Follow one request through the stack.

Four layers, one language. Pick a layer to see the code you actually write.

Typed URLs, typed responses.

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.

  • Path, query, and body extractors
  • Middleware, sessions, CSRF, rate limiting
  • route! builds links from handlers
src/routes/web.rs
fn 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 }))
}

Concurrency

Wait on the slowest call, not the sum.

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.

Run queries concurrently.

Execute independent database queries or HTTP calls in parallel with task::try_join!, so a page only waits on its slowest call.

Concurrency docs →
src/http/dashboard.rs
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 })))
}

Respond now, finish in the background.

Hand off webhooks or follow-up work to task::background and return immediately, with context, tracing, and graceful shutdown handled for you.

Background tasks →
src/http/orders.rs
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())
}
Also in task join! select! map timeout spawn spawn_blocking sleep

Included, not bolted on

The services other stacks make you assemble.

A cron daemon, a typed pipeline engine, durable workflows, a supervisor, modules, media, search, and feature flags — all first-party.

cron dust-cron

A real daemon, down to the second.

Due commands run in their own processes. Every run records its exit code, output, CPU time, and peak memory.

pipeline dust::pipeline

Compose a flow, not a pyramid.

Each stage receives the value and a Next continuation. Change it, pass it on, or stop early — then test every stage on its own.

workflows

Runs that survive deploys.

Steps execute once and resume across sleeps, webhooks, and restarts.

supervisor

Programs stay up.

Workers and cron restart in their own processes, with status and statistics.

modules

Features with a boundary.

Routes, migrations, views, and services in modules/, enabled per application.

media

Files for your models.

Store, collect, and generate resized or cropped versions on any disk.

search

Search the models.

Post::search("rust") over a database index or an external engine.

flags

Ship gradually.

Resolve a value per user or team once, store it, and roll it out without a deploy.

Real-time

Updates arrive without a refresh.

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.

Broadcast once. Every tab updates.

Private and presence channels are checked by your authorization rules before anyone subscribes. The event itself is plain Rust.

  • Public, private, and presence channels
  • Queued delivery with retries
  • Echo client and Relay for local development
Broadcasting docs →
src/events/order_shipped.rs
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

Server-rendered pages. No build step.

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.

HTML out of the handler.

Views take typed data from Rust and render in the same process. Layouts, includes, components, and fragments are built in.

  • Jinja syntax with automatic escaping
  • io/ui components, no bundler
  • Fragments for partial updates
Template docs →
resources/views/posts/show.html
{% 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

Pulse watches the application for you.

Requests, latency, CPU, memory, storage, mail, queues, and incidents, streamed over SSE into one dashboard. Open it while the application runs.

  • Live request sampling and route history
  • Percentiles, not averages
  • Alerts with incident history

Typed at the edge

Describe the input once. Trust it everywhere.

Request payloads become typed structs with rules and an authorization check. Tests send real requests through the whole stack.

Validated input

Rules run before the handler. Invalid input returns to the form with its errors, or becomes a structured JSON error for an API client.

src/http/posts.rs
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))
}
Validation docs →

Full-stack tests

Requests go through the full middleware, routing, and handler stack without binding a network port.

tests/posts.rs
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"]);
}
Testing docs →

Batteries included

75 guides, covering everything in the box.

Routing, models, queues, workflows, broadcasting, mail, storage, search, and the tools around them. Every area has a written guide with runnable examples.

Browse all 75 guides

Built for agents

An agent that reads the version it compiles.

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.

  • Conventions and commands in AGENTS.md
  • 75 guides for the exact installed version
  • dust docs:install refreshes both
Agent workflow docs →
$ dust docs:installWrote AGENTS.md and the guides into storage/docs/
storefront/
├── AGENTS.md conventions & commands
├── storage/docs/ 75 guides, this version
├── src/ routes, handlers, models
└── tests/ full-stack tests

FAQ

Questions, answered.

Does dust need Node.js?

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.

Which databases can I use?

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.

Can I use it in production today?

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.

How do I deploy an application?

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.

Can I add my own crates and modules?

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.

What does it cost?

dust is MIT licensed. Pulse and the other demo modules are published separately on the module registry.

Leave the glue code in the dust.

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