loco-rs/loco
{ "createdAt": "2023-11-07T08:58:40Z", "defaultBranch": "master", "description": "π π¦ The one-person framework for Rust for side-projects and startups", "fullName": "loco-rs/loco", "homepage": "https://loco.rs", "language": "Rust", "name": "loco", "pushedAt": "2025-11-21T10:12:29Z", "stargazersCount": 8328, "topics": [ "api", "axum", "rust", "rust-lang" ], "updatedAt": "2025-11-27T04:37:01Z", "url": "https://github.com/loco-rs/loco"}English Β· [δΈζ]!(./README-zh_CN.md) Β· [FranΓ§ais]!(./README.fr.md) Β· [Portuguese (Brazil)]!(./README-pt_BR.md) γ» [ζ₯ζ¬θͺ]!(./README.ja.md) Β· [νκ΅μ΄]!(./README.ko.md) Β· [Π ΡΡΡΠΊΠΈΠΉ]!(./README.ru.md) Β· [EspaΓ±ol]!(./README.es.md)
Whatβs Loco?
Section titled β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:
Section titled β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
Section titled βGetting Startedβcargo install lococargo install sea-orm-cli # Only when DB is neededNow you can create your new app (choose βSaaS appβ).
β― 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 successfully in:myapp/
- assets: You've selected `clientside` for your asset serving configuration.
Next step, build your frontend: $ cd frontend/ $ npm install && npm run buildNow cd into your myapp and start your app:
$ cargo loco start
β β β β β β β β ββ β βββ β β β βββββ ββββββββββ βββββββββ βββββββββββ βββββββββ βββββββββ βββββ βββ βββββ βββ βββββ βββ ββββββββ βββββ βββ βββββ βββ βββββ βββ βββββββββ βββββ βββ βββββ βββββ βββ βββββββββββ βββββ βββ βββββ βββ βββββ βββ βββββββββββ βββββ βββ ββββ βββ βββββ βββ βββββ ββββββ ββββββββββ ββββββββββ ββββββββββ βββ βββββββββββββββββββββββββββββββββββββββ https://loco.rs
listening on port 5150Powered by Loco
Section titled βPowered by Locoβ- SpectralOps - various services powered by Loco framework
- Nativish - app backend powered by Loco framework
Contributors β¨
Section titled βContributors β¨βThanks goes to these wonderful people: