loco-rs /loco

🚂 🦀 The one-person framework for Rust for side-projects and startups

★ 9,634⑂ 445👁 51⑃ 966● 625▤ 13
RustApache-2.0Created 2023-11-07loco.rs
Download: v1.3.1v1.3.1 ↓1.3.12026-11-06
+7
Daily
9,634
stars
445
forks
51
watchers
966
prs
625
issues
13
releases

README

Welcome to Loco

   
    --
🚂 Loco is Rust on Rails.
 --
   

   
   
   

 

English · 中文 · Français · Portuguese (Brazil) ・ 日本語 · 한국어 · Русский · Español · Vietnamese · العربية · Bahasa Indonesia

 What's Loco?

Loco is strongly inspired by Rails. If you know Rails and Rust, you'll feel at home. If you only know Rails and new to Rust, you'll find Loco refreshing. We do not assume you know Rails.

For a deeper dive into how Loco works, including detailed guides, examples, and API references, check out our documentation website.

 Features of Loco

 Convention Over Configuration: Similar to Ruby on Rails, Loco emphasizes simplicity and productivity by reducing the need for boilerplate code. It uses sensible defaults, allowing developers to focus on writing business logic rather than spending time on configuration.

 Rapid Development: Aim for high developer productivity, Loco’s design focuses on reducing boilerplate code and providing intuitive APIs, allowing developers to iterate quickly and build prototypes with minimal effort.

 ORM Integration: Model your business with robust entities, eliminating the need to write SQL. Define relationships, validation, and custom logic directly on your entities for enhanced maintainability and scalability.

 Controllers: Handle web requests parameters, body, validation, and render a response that is content-aware. We use Axum for the best performance, simplicity, and extensibility. Controllers also allow you to easily build middlewares, which can be used to add logic such as authentication, logging, or error handling before passing requests to the main controller actions.

 Views: Loco can integrate with templating engines to generate dynamic HTML content from templates.

 Background Jobs: Perform compute or I/O intensive jobs in the background with a Redis backed queue, or with threads. Implementing a worker is as simple as implementing a perform function for the Worker trait.

 Scheduler: Simplifies the traditional, often cumbersome crontab system, making it easier and more elegant to schedule tasks or shell scripts.

 Mailers: A mailer will deliver emails in the background using the existing loco background worker infrastructure. It will all be seamless for you.

 Storage: In Loco Storage, we facilitate working with files through multiple operations. Storage can be in-memory, on disk, or use cloud services such as AWS S3, GCP, and Azure.

 Cache: Loco provides an cache layer to improve application performance by storing frequently accessed data.

So see more Loco features, check out our documentation website.

 Getting Started
 --
sh
cargo install loco
cargo install sea-orm-cli  Only when DB is needed

 --

Now you can create your new app (choose "SaaS app").

 --
sh
❯ loco new
✔ ❯ App name? · myapp
✔ ❯ What would you like to build? · Saas App with client side rendering
✔ ❯ Select a DB Provider · Sqlite
✔ ❯ Select your background worker type · Async (in-process tokio async tasks)

🚂 Loco app generated suc

Top issues

Discussions

Latest release

v1.3.1 v1.3.1 2026-11-06
Fixed

- SQLite apps could fail to boot with PoolTimedOut. 1.3.0 runs the
  PRAGMAs on every new connection, and some of them read the database file,
  so opening a connection waits on any other connection's lock for up to
  busy_timeout. That wait counted against connect_timeout (500ms in
  generated test configs), so a busy file failed boot instead of waiting.
  SQLite pools now allow busy_timeout on top of the acquire timeout. Seen
  as intermittent test failures, mostly on CI and Windows.

Snapshot: 2026-11-16T09:23:14Z · Data license Apache-2.0 · JSON