Typed routes. Validated bodies. A Django-style ORM.
siderite is an async-first Rust web framework. Handlers look like FastAPI, models validate like Pydantic v2, and queries are lazy QuerySets built from field constants that the compiler checks.
Pre-alpha. Phase 6 (production tooling) is complete. Public APIs will change. MSRV 1.92, edition 2024.
use siderite::prelude::*;
#[derive(Deserialize, Validate, Schema)]struct Greeting { shout: Option<bool> }
/// Greet somebody by name.#[get("/hello/{name}", tag = "greetings")]async fn hello(Path(name): Path<String>, Query(q): Query<Greeting>) -> PlainText<String> { let msg = format!("hello, {name}"); PlainText(if q.shout.unwrap_or(false) { msg.to_uppercase() } else { msg })}
#[tokio::main]async fn main() -> Result<(), ServerError> { App::new().title("Hello").routes(routes![hello]).run("127.0.0.1:8000").await}- HTTP
Route macros, extractors, middleware, lifespan, WebSockets, and RFC 7807 errors. OpenAPI 3.1 is generated from handler signatures and served at
/docs.- Validation
A Pydantic-style pipeline on
#[derive(Validate, Schema)]. Invalid input is a 422 that lists every error with its location.- ORM
#[derive(Model)]and lazyQuerySets.User::age.icontains(..)does not compile. Unsupported backend features fail with a capability error before any I/O.- Production
Layered configuration, signals, database routing, cache, CLI, testkit, and migrations for SQLite, PostgreSQL, and MySQL.