New Rust Framework Rapidly Gains Popularity
The Rust language ecosystem continues to actively develop, and one of the most notable events in recent months has been the rapid rise of a new web framework — Loco. Designed as a "Rust analog of Ruby on Rails", Loco has attracted the attention of thousands of developers seeking to combine the performance of a systems language with the convenience and familiar patterns of web development.
What is Loco?
Loco is a framework for creating web applications and APIs in Rust that emphasizes:
- Development speed: code generation, migrations, built-in templates, and CLI tools.
- Rust performance: safe memory management and high execution speed.
- Simple configuration: minimal boilerplate and a clear project structure.
Why is Loco gaining popularity?
The growing interest in Loco can be explained by several factors:
- Demand for "Rust for the web": the community has long been looking for a framework that simplifies web development without sacrificing safety and speed.
- Active community: the project quickly accumulated documentation, tutorials, and examples on GitHub.
- Support for modern standards: built-in support for async/await, WebSockets, PostgreSQL, and SQLite.
- Integration with the ecosystem: Loco easily combines with other popular libraries (Serde, Tokio, Axum).
Key features of Loco
- Project generator: the command
cargo loco new project_namecreates a ready-made structure with routes, models, and tests. - Built-in authentication: JWT, sessions, and basic roles "out of the box".
- Background jobs: support for deferred tasks via Redis or an in-memory queue.
- Middlewares: logging, CORS, compression, and custom handlers.
Example of using Loco
Creating a simple API service with Loco takes just a couple of minutes:
// Create a new projectcargo loco new my_api
// Add a routeloco add route /hello
// Write a handlerasync fn hello() -> Result<String, Error> { Ok("Hello from Rust!".to_string())}Such code will already work with high performance and full type safety.
Comparison with other frameworks
- Actix Web: faster, but requires more manual configuration and lacks a built-in generator.
- Rocket: convenient syntax, but less flexible in customization and slower to evolve.
- Axum: lightweight, but without high-level abstractions — Loco is built on top of Axum, adding convenience.
Prospects and future
According to GitHub data, the number of stars for the Loco repository exceeded 5,000 in its first year, and monthly downloads from crates.io are growing by 40%. Developers note that the framework is especially useful for startups and MVPs, where product launch speed is important, but you also want a solid foundation in Rust.
If you've been wanting to try Rust for web development for a long time, now is a great opportunity.