loco-rs / loco

πŸš‚ πŸ¦€ The one-person framework for Rust for side-projects and startups
https://loco.rs
Apache License 2.0
5.45k stars 235 forks source link
api rust rust-lang

Welcome to Loco

πŸš‚ Loco is Rust on Rails.

[![crate](https://img.shields.io/crates/v/loco-rs.svg)](https://crates.io/crates/loco-rs) [![docs](https://docs.rs/loco-rs/badge.svg)](https://docs.rs/loco-rs) [![Discord channel](https://img.shields.io/badge/discord-Join-us)](https://discord.gg/fTvyBzwKS8)

English Β· δΈ­ζ–‡ Β· FranΓ§ais Β· Portuguese (Brazil) ・ ζ—₯本θͺž Β· ν•œκ΅­μ–΄ Β· Русский

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:

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

Getting Started

cargo install loco
cargo install sea-orm-cli # Only when DB is needed

Now 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 build

Now cd into your myapp and start your app:

$ cargo loco start

                      β–„     β–€
                                β–€  β–„
                  β–„       β–€     β–„  β–„ β–„β–€
                                    β–„ β–€β–„β–„
                        β–„     β–€    β–€  β–€β–„β–€β–ˆβ–„
                                          β–€β–ˆβ–„
β–„β–„β–„β–„β–„β–„β–„  β–„β–„β–„β–„β–„β–„β–„β–„β–„   β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„ β–„β–„β–„β–„β–„β–„β–„β–„β–„ β–€β–€β–ˆ
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ   β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ   β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ   β–ˆβ–ˆβ–ˆ β–€β–ˆ
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ   β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ   β–€β–€β–€ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ   β–ˆβ–ˆβ–ˆ β–„β–ˆβ–„
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ   β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ       β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ   β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆβ–„
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ   β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ   β–„β–„β–„ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ   β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ   β–ˆβ–ˆβ–ˆ  β–ˆβ–ˆβ–ˆβ–ˆ   β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ   β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆβ–€
  β–€β–€β–€β–ˆβ–ˆβ–„ β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€  β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€  β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€ β–ˆβ–ˆβ–€
      β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€
                https://loco.rs

listening on port 5150

Powered by Loco

Contributors ✨

Thanks goes to these wonderful people: