# Autumn 🍂
[](https://github.com/madmax983/autumn/actions/workflows/ci.yml)
[](https://codecov.io/gh/madmax983/autumn)
[](LICENSE)
[](https://www.rust-lang.org)
> Spring Boot-style web framework for Rust, built on [Axum](https://github.com/tokio-rs/axum).
Autumn assembles proven Rust crates into a convention-over-configuration web
stack with proc-macro ergonomics, framework defaults, and customization options when
you need them. If Spring Boot, Rails, or Laravel feels familiar, Autumn aims
for that same "ship the app, not the plumbing" shape in Rust.
> **Status:** the latest tagged release is `v0.1.0` (2026-03-26), but `trunk`
> already contains substantial post-`v0.1.0` work. This README documents the
> current `trunk` branch, not just the `v0.1.0` tag. The framework is still
> experimental and not recommended for production use yet.
## Features
- **Route and app macros** - `#[get]`, `#[post]`, `#[put]`, `#[delete]`, `routes![]`, `#[autumn_web::main]`
- **Pre-rendering pages to static HTML** - `#[static_get]` + `static_routes![]` with `autumn build` pre-rendering to `dist/`
- **Application builder** - `.routes()`, `.tasks()`, `.static_routes()`, `.scoped()`, `.merge()`, and `.nest()`
- **Configuration and profiles** - defaults, `autumn.toml`, `autumn-{profile}.toml`, and `AUTUMN_*` overrides
- **Database ergonomics** - async Postgres pool, `Db` extractor, `#[model]`, `#[repository]`, hooks, and embedded migrations
- **HTML stack** - Maud templating, bundled htmx, Tailwind build pipeline, and static asset serving
- **Operations** - `/health`, `/actuator/*`, structured logging, metrics, and graceful shutdown
- **Background work** - `#[scheduled]` tasks and runtime task visibility at `/actuator/tasks`
- **Security primitives** - session cookies, auth extractor, security headers, CSRF, and `#[secured]`
- **CLI workflow** - `autumn new`, `autumn setup`, `autumn dev`, `autumn build`, and `autumn migrate`
## Quickstart
```bash
# Install the CLI from this workspace
cargo install --path autumn-cli
# Create a new project
autumn new my-app
cd my-app
# Optional: download Tailwind CSS for styled builds
autumn setup
# Development server with file watching
autumn dev
# Or run without watch mode
# cargo run
```
Visit <http://localhost:3000>. Autumn also auto-mounts `/health`,
`/actuator/health`, `/actuator/info`, and `/static/js/htmx.min.js`.
If you add `#[static_get]` routes, `autumn build` pre-renders them into
`dist/`.
## Local-Safe vs Production-Safe
Autumn still distinguishes between "works on your laptop" and "safe to run in a
multi-replica deployment":
- Local-safe defaults: in-memory sessions, pretty logs in `dev`, process-local `#[scheduled]` tasks, and single-binary startup.
- Production-safe defaults: `/live`, `/ready`, `/startup` probes, OTLP telemetry config, Redis-backed sessions, container scaffolding from `autumn new`, and explicit migration jobs before web replicas roll.
If you are deploying beyond a single process, read the
[Cloud-Native Guide](docs/guide/cloud-native.md) before treating the defaults as
done.
## Example
This is the `main.rs` generated by `autumn new`:
```rust
use autumn_web::prelude::*;
#[get("/")]
async fn index() -> &'static str {
"Welcome to Autumn!"
}
#[get("/hello/{name}")]
async fn hello_name(name: autumn_web::extract::Path<String>) -> String {
format!("Hello, {}!", *name)
}
#[autumn_web::main]
async fn main() {
autumn_web::app()
.routes(routes![index, hello_name])
.run()
.await;
}
```
## Built On
- [Axum](https://github.com/tokio-rs/axum) - async HTTP routing and middleware
- [Diesel](https://diesel.rs/) + [diesel-async](https://github.com/weiznich/diesel_async) - database access
- [Maud](https://maud.lambda.xyz/) - compiled HTML templates
- [htmx](https://htmx.org/) - HTML-first interactivity
- [Tailwind CSS](https://tailwindcss.com/) - utility-first styling
- [Tokio](https://tokio.rs/) - async runtime
- [Tracing](https://github.com/tokio-rs/tracing) - structured logging
## Examples
| [`examples/hello`](examples/hello) | Minimal hello-world app with route macros and no database |
| [`examples/todo-app`](examples/todo-app) | Classic full-stack CRUD app with Diesel, Maud, htmx, Tailwind, and JSON endpoints |
| [`examples/blog`](examples/blog) | Blog engine with admin UI, validation, and pre-rendering pages to static HTML via `#[static_get]` |
| [`examples/bookmarks`](examples/bookmarks) | Repository macro, generated CRUD API, profiles, scheduled tasks, and actuator endpoints |
| [`examples/wiki`](examples/wiki) | Mutation hooks, revision history, generated REST API, and slug lifecycle management |
## Documentation
- [Getting Started Guide](docs/guide/getting-started.md)
- [Cloud-Native Guide](docs/guide/cloud-native.md)
- [Todo Tutorial](docs/guide/tutorial/index.md)
- [API Reference](https://docs.rs/autumn-web)
- [Pre-rendering Design Notes](docs/design/hybrid-rendering.md)
## Requirements
- Rust 1.86.0+ (edition 2024)
- PostgreSQL for database-backed apps
Autumn can still run without a database if you omit the `[database]` section.
## License
MIT OR Apache-2.0