Everything you need to take a side-project or startup from an idea to production — models, controllers, jobs, mailers, auth — generated and wired together.
Loco follows Rails — carefully adapted to modern Rust. The heavy lifting is tucked away so you can move fast, and pulled back out the moment you need to scale.
Service, data, emails, background jobs, tasks, and a CLI to drive it all — in the box from day one.
Loco follows Rails. There, we said it — its concepts, carefully adapted to idiomatic Rust.
Unapologetically optimized for the solo developer. Complexity and heavy lifting tucked away.
Split, reconfigure, or use only the parts of Loco you need. Grow without a rewrite.
Just a service. Or with a database. Or a background worker. Or a task. Use what you need.
Models, controllers, jobs — test the whole app with very little effort. Ship fast, stay safe.
async fn returning Result<Response>.// src/controllers/articles.rs use loco_rs::prelude::*; use crate::models::_entities::articles; use crate::views::article::ArticleResponse; pub async fn list(State(ctx): State<AppContext>) -> Result<Response> { let items = articles::Model::latest(&ctx.db).await?; let res: Vec<_> = items.iter().map(ArticleResponse::new).collect(); format::json(res) } pub fn routes() -> Routes { Routes::new() .prefix("articles") .add("/", get(list)) }