A Laravel-shaped web framework for Rust. Larust gives Laravel developers a
familiar application structure—routing, validation, templates, an ORM, and
xr CLI commands, while keeping the underlying application ordinary,
compiled, type-checked Rust built on Axum, sqlx, and tower-sessions.
Larust is an independent, community project inspired by Laravel's design. It is not affiliated with, endorsed by, or sponsored by Laravel LLC, Taylor Otwell, or the Laravel project.
Website · Documentation · First app guide
Every Larust crate is published to crates.io, including xr itself -
cargo install larust-cli gets you a working CLI with no clone needed,
and xr new/xr convert generate apps that depend on the published
crates directly, no checkout required either.
v0.6.0 is the current development line. The framework includes the core web stack, authentication, migrations and relationships, queues and scheduling, named console commands, optional integrations, and a Laravel conversion tool. See MILESTONES.md for the development history and rust-laravel.md for the original design rationale and Laravel-to-Rust comparisons.
cargo install larust-cliThat's it - no clone required. Contributing to Larust itself, or want
xr new/xr convert to scaffold against local, unreleased framework
changes instead of the published crates? Clone the repo and use
./install.sh/.\install.ps1 plus --workspace <path> instead - see
Installation.
xr new myapp --auth
cd myapp
xr migrate
xr devOpen http://127.0.0.1:34187. --auth adds a User model, registration,
login/logout, and auth/guest route protection; omit it for a smaller starting
point.
From an app directory, xr handles framework tasks and forwards named commands
you register in routes/console.rs to the application itself:
xr route:list
xr make:controller CommentController --resource
xr make:model Category --migrationThis repository's own bundled reference app includes a real named command - from a clone of this repo (not the app you just scaffolded):
cd examples/blog
xr command:list
xr report:postsFor the complete command reference—including deployment, background work,
database utilities, and app-defined commands—see The xr CLI.
From a Larust checkout, run framework commands through Cargo instead:
cargo run -p larust-cli -- new myapp --authInside a generated app, its own binary accepts the same app-facing commands:
cargo run -- migrate
cargo run -- route:list
cargo run| If you want to… | Start here |
|---|---|
| Build your first application | Your First App |
| Follow one feature end to end | Build a Posts Feature |
| Find a framework capability | Documentation index |
| Compare Larust with Laravel | Coming from Laravel |
| Understand the internal design | Architecture |
examples/blog is the reference app. It demonstrates auth, a Post model
that belongs to its author, CSRF-protected forms, session flash messages, route
model binding, and a custom console command.
crates/
├── larust-core, larust-http, larust-orm, larust-validation, larust-view
│ Foundation: application bootstrap, routing, persistence, validation, views
├── larust-auth, larust-cache, larust-console, larust-db, larust-events
│ Application services: auth, cache, commands, key-value storage, events
├── larust-mail, larust-notifications, larust-queue, larust-scheduler
│ Background and communication services
├── larust-live, larust-spa, larust-reverb, larust-storage
│ Interactive UI, real-time, and file-storage capabilities
├── larust-permissions, larust-sanctum, larust-shield, larust-socialite
│ Optional security and identity integrations
├── larust-cli, larust-convert, larust-testing, larust-support
│ Tooling, Laravel conversion, testing, and generated-app facade
└── …additional focused crates for language support, repositories, sitemaps,
SQL Server, and procedural macros
examples/
└── blog Reference application exercising Larust end to end
demo/ Standalone demonstration application
Generated apps depend directly on larust-core, larust-http,
larust-support, tokio, and sqlx. larust-support exposes the
rest of Larust's application-facing API; the architecture guide
explains why sqlx remains a direct dependency.
cargo build --workspace
cargo test --workspace
cargo clippy --workspace -- -D warnings
cargo fmt --checkEnable the repository's pre-push hook once to run the same fast compile gate used first in CI:
git config core.hooksPath .githooksThe hook runs cargo check --workspace --all-targets --locked. See
CONTRIBUTING.md for contribution guidance,
SECURITY.md for security reports, and
CODE_OF_CONDUCT.md for community expectations.
AI models were used to assist documentation as they are far better at documentation than I am.
Licensed under the Apache License, Version 2.0.
