Loco vs Axum
Loco is built on Axum, so this is a choice between conventions and freedom. Loco adds Rails-style generators, SeaORM models and migrations, Tera views, JWT auth, background workers, a scheduler, mailers, storage and caching. Plain Axum gives you routing, extractors and Tower middleware and leaves every other decision to you.
- Loco
- Rust · Apache-2.0
- Axum
- Rust · MIT
- Updated
- 2026-10-02
Which one should you pick?
- You are building a CRUD-heavy SaaS and want generators for models, controllers, workers and mailers
- You come from Rails and want familiar conventions in Rust
- You want auth, jobs, cache and storage wired in with feature flags
- You are building an API or service that does not look like a Rails app
- You want to choose the database layer (sqlx, Diesel, SeaORM) and templating yourself
- You want the smallest dependency footprint
Side by side
| Attribute | Loco | Axum |
|---|---|---|
| Written in | Rust | Rust |
| License | Apache-2.0 | MIT |
| Frontend | none | none |
| Backend & APIs | RustAxumTeraLettreJWT | RustAxumTowerHyperTokio |
| Data & persistence | SeaORMsqlxRedisOpenDAL | none |
| Infrastructure & deploy | GitHub ActionsAstro | GitHub Actionscargo-deny |
| Key decisions |
|
|
| Audited | 9f7e021 · 2026-10-02 | f8b02f2 · 2026-10-02 |
How they differ
What you get
Loco (loco-rs) bundles a full application framework: Axum controllers, SeaORM 2.0 models and migrations, Tera views and mailer templates, JWT auth with argon2, background workers on Postgres, SQLite or Redis, a cron-style scheduler, OpenDAL storage and an in-memory or Redis cache. Each piece sits behind a feature flag. Axum is the routing and extraction layer underneath: Router, typed extractors, axum::serve on Hyper, and Tower middleware.
How you build
In Loco you run cargo loco generate scaffold, migration, worker, mailer or task. Templates come from loco-gen, and new apps start from loco new. In Axum you assemble the layout yourself. The repository’s examples/ (sqlx-postgres, diesel-postgres, jwt, oauth, templates-minijinja) show common integrations as separate runnable projects.
Agents and conventions
Loco’s repository includes an AGENTS.md, an agent skill and a graded evals/ suite. Axum’s strength for agents is its small surface: plain functions, typed extractors and compile errors from debug_handler. With either, the agent loop is the same: cargo check, cargo clippy -- -D warnings, cargo test.
Rules
Agent-ready rules for each style: Loco + SeaORM, Rust + Axum + PostgreSQL for APIs, and Axum + htmx + Askama for server-rendered apps. Background: Building web apps in Rust in 2026.
Frequently asked questions
Does Loco use Axum?
Yes. Loco controllers are Axum handlers (axum 0.8 with macros and multipart), and tower-http middleware for tracing, CORS, compression, timeouts and static files is configured in its workspace, so Axum extractors and Tower layers work inside a Loco app.
Is Loco the Rails of Rust?
It describes itself as "Rust on Rails": convention over configuration, generators, an ORM with migrations, controllers, views, background jobs, a scheduler and mailers. It is far younger than Rails, with a smaller ecosystem.
Which database does each use?
Loco uses SeaORM 2.0 on sqlx 0.9 with PostgreSQL and optional SQLite. Axum has no data layer; its repository examples show sqlx, Diesel, diesel-async, tokio-postgres, MongoDB and Redis integrations.
Is Loco good for AI coding agents?
Its repository ships an AGENTS.md, an agent skill under skills/loco and an evals harness that grades agents on Loco tasks in CI. Generators also give agents a fixed layout to follow, which reduces boilerplate mistakes.
More architecture comparisons
View allAxum vs Actix Web
Axum vs Actix Web compared on architecture: Hyper and Tower vs an own HTTP stack, routing, middleware, crates in the workspace and who uses each.
AFFiNE vs AppFlowy
AFFiNE vs AppFlowy compared on architecture: React + Yjs vs Flutter + Rust, local-first storage, sync servers, native code and local AI.
Appsmith vs ToolJet vs Budibase
Appsmith, ToolJet and Budibase compared on architecture: Java vs NestJS vs Koa, MongoDB vs PostgreSQL vs CouchDB, sandboxing, plugins and deployment.
Authelia vs authentik vs Logto
Authelia, authentik and Logto compared on architecture: Go vs Django vs Koa, storage, OIDC providers, protocol support and how each fits a self-hosted stack.