Getting Started

Resuma is a resumable Rust web framework — no hydration, no eager JS execution. Components run on the server; a tiny loader resumes interactivity on demand. Resuma Flow adds file-based pages, loads, and submits in one crate — core and full-stack unified.

Examples in this repo

See Examples for all runnable crates and when to use each.

Rust apps run on the server — clone the repo and launch a live example in one command:

Todo (full showcase)

Signals, #[server], #[island], js!, theme — every Resuma feature in one app.

cargo run -p example-todo

Flow demo (full-stack)

Loads, submits, streaming SSR, and deferred chunks.

cargo run -p example-flow-demo

Docs are live at resuma-docs.fly.dev. To hack on the docs site locally: cargo run (from apps/resuma-docs, sibling to apps/resuma; not under examples/).

Prerequisites

To build Resuma apps locally, you need:

  • Rust 1.91+ (stable channel via rustup)
  • Node.js 18+ (optional — only to rebuild the JS runtime)
  • Your favorite editor (VS Code + rust-analyzer recommended)

Core Resuma needs no Redis, no database, and no external services — CSRF, CSP, and rate limiting are built in. Optional SQLx/Postgres is for your app data only. See FAQ and Security.

Optionally, read How resumability works before scaffolding.

Install the CLI

From crates.io (recommended):

cargo install resuma

API reference: docs.rs/resuma · docs.rs/resuma-macros

From source while developing the monorepo:

git clone https://github.com/GoldevLab/resuma
cd resuma
cargo install --path crates/resuma --features cli

resuma --help

Install the AI skill (Cursor / Codex)

Optional but recommended — teaches your editor Resuma patterns (signals, Show, Flow, server actions):

resuma install skill

Full guide: skill vs MCP, Gemini, team setup →

Create an app using the CLI

Use resuma new or resuma create to scaffold a starter. Pick a template:

basicStatic SSR · zero client JS
todoSignals · #[server] · #[island] · js!
flowMulti-page · src/pages/ · layouts
flow-bookingAppointments · query loaders · SPA date picker
flow-fullstackFlow + SQLx SQLite sample
productionFlow + security stub + Dockerfile + fly.toml
resuma new my-app                    # interactive menu
resuma new my-app --template basic
resuma new my-app --template todo
resuma new my-app --template flow
resuma new my-app --template flow-booking
resuma new my-app --template flow-fullstack
resuma new my-app --template production

cd my-app

The CLI generates Cargo.toml and src/main.rs.

Start the development server

Inside your project directory. resuma dev installs cargo-watch if needed, rebuilds on save, and refreshes the browser automatically.

resuma dev
resuma dev --open          # open browser
resuma dev --kill-stale    # free port if something is stuck (Linux)
# cargo-watch also watches public/ for static file changes

Without the CLI, plain Cargo works too:

cargo run

Hello, Resuma

A minimal component with resumable state:

use resuma::prelude::*;

#[component]
fn Hello() {
    let excited = signal(false);
    view! {
        <main>
            <h1>"Hello Resuma"</h1>
            <button onClick={excited.set(true)}>
                "Click me"
            </button>
        </main>
    }
}

#[tokio::main]
async fn main() -> std::io::Result<()> {
    ResumaApp::new()
        .component("/", Hello)
        .serve(ServeOptions::default())
        .await
}

Add a server action

#[server]
async fn greet(name: String) -> String {
    format!("Hello, {name}!")
}

From a handler, call __resuma.action('greet', [name]) — RPC at POST /_resuma/action/:name.

Project structure

basic / todo — single main.rs (+ security modules for todo). Flow — add src/pages/ (see Project structure).

my-app/                  # resuma new --template todo
├── Cargo.toml
└── src/
    ├── main.rs
    ├── security.rs
    └── todo_store.rs

Deploy to production

Local dev needs zero env varscargo run and resuma dev work out of the box. For Fly or Docker, scaffold with resuma new --template production (includes fly.toml with RESUMA_ENV and RESUMA_TRUST_PROXY). Only add RESUMA_EXEC_API_KEY if your app uses workers.

Environment variables — local vs prod, Fly secrets, resuma doctor →

Next steps