autumn-web 0.1.0

An opinionated, convention-over-configuration web framework for Rust
Documentation

Autumn

An opinionated, convention-over-configuration web framework for Rust.

Autumn assembles proven Rust crates (Axum, Maud, Diesel, htmx, Tailwind) into a Spring Boot-style developer experience with proc-macro-driven conventions and escape hatches at every level.

Quick start

use autumn_web::prelude::*;

#[get("/")]
async fn index() -> Markup {
    html! { h1 { "Hello, Autumn!" } }
}

#[autumn_web::main]
async fn main() {
    autumn_web::app()
        .routes(routes![index])
        .run()
        .await;
}

Architecture overview

Layer Crate Purpose
HTTP server Axum Routing, extractors, middleware
HTML templates Maud Type-safe, compiled HTML via html! macro
Database Diesel Async Postgres via diesel-async + deadpool
Client interactivity htmx Embedded JS served at /static/js/htmx.min.js
Styling Tailwind CSS Downloaded + managed by autumn-cli

Modules

  • [mod@app] -- Application builder for configuring and launching the server.
  • [config] -- Layered configuration: defaults, autumn.toml, env overrides.
  • [db] -- Database connection pool and the [Db] request extractor.
  • [error] -- Framework error type ([AutumnError]) and result alias.
  • [extract] -- Re-exported Axum extractors (Form, [Json], Path, Query).
  • [health] -- Auto-mounted health check endpoint.
  • [logging] -- Structured logging via tracing-subscriber.
  • [middleware] -- Built-in middleware (request IDs).
  • [prelude] -- Glob import for the most common types.
  • [route] -- Route descriptor used by macro-generated code.

Zero-config defaults

An Autumn app runs out of the box with no configuration file. Every setting has a sensible default (port 3000, info log level, etc.). Override via autumn.toml or AUTUMN_* environment variables. See [config::AutumnConfig] for the full list.