Rust Quick Start
Scaffold and run your first Axum + SeaORM project end to end
Overview
This guide walks through the default Rust flow: scaffold an Axum + SeaORM + SQLite project, run it, and verify the health endpoint. Rust projects run the CLI as the standalone tristack binary.
Install the CLI
Install the tristack binary for your OS:
powershell irm https://tristack.space/install.ps1 | iex
1. Scaffold
tristack my-apiFollow the prompts, or skip them and take the defaults completely non-interactively:
tristack my-api --yesAfter scaffolding you'll see the reproducible command, which is also saved to tristack.jsonc inside the project.
2. Run it
cd my-api
cp .env.example .env
cargo build
cargo watch -x runOpen http://localhost:8000/health — you should see {"status":"ok"}.
Note
The package name is a slugged version of your project name (my-api → my_api), sources live in
src/ (src/main.rs entrypoint, src/db.rs data layer), and the port (8000) and app name come
from PORT and APP_NAME in .env.
3. Common commands
cargo build # install/compile dependencies (default package manager)
cargo run # run without the cargo-watch addon
cargo watch -x run # live reload (cargo-watch addon)
cargo clippy # lint (clippy addon)
cargo fmt # formatDatabase migrations
Rust stacks default to no migration tool (--migrations none). Run migrations with your ORM's own tooling:
diesel migration run # Diesel
sea-orm-cli migrate run # SeaORM
sqlx migrate run # sqlxDocker
With the docker addon, run the whole stack in containers:
docker compose up --build4. Other frameworks
The stack varies by framework — same flow, different server:
| Framework | Scaffold flag | Run |
|---|---|---|
| Axum (default) | --framework axum | cargo watch -x run / cargo run |
| Actix Web | --framework actix-web | cargo watch -x run / cargo run |
| Rocket | --framework rocket | cargo run |
| Warp | --framework warp | cargo watch -x run / cargo run |
| Salvo | --framework salvo | cargo watch -x run / cargo run |
| Loco | --framework loco | cargo run |
5. Reproduce the same stack
Every scaffold prints a reproducible command and stores it in tristack.jsonc:
tristack my-api \
--language rust \
--framework axum \
--orm seaorm \
--migrations none \
--database sqlite \
--package-manager cargo \
--addons docker cargo-watch clippyOr validate it without writing anything:
tristack my-api --yes --dry-runNext steps
- Project Structure — exactly what gets generated
- CLI Options — every flag
- Compatibility — valid combinations
