On 1 December 2026, Taylor Otwell announced the first beta of Laravel Rust, a full-stack web framework that brings Laravel’s conventions to Rust. It isn’t a wrapper around PHP. It’s a separate framework built on Axum and Tokio, with routing, an ORM, queues, mail, broadcasting, Inertia support and testing helpers. According to the announcement, it’s “near feature parity” with Laravel PHP.
The Laravel team says Laravel Rust is in beta now, with a stable release planned after about six to eight weeks of feedback. This post walks through creating an app and the core building blocks with code from the official Introducing Laravel Rust post, and gives an honest take on when it’s worth trying.
Why Laravel in Rust?
The announcement gives three reasons:
- Performance. Laravel says that in its internal benchmarks on Laravel Cloud, Laravel Rust ran 18 times faster than Laravel PHP, using significantly less CPU and memory. That’s a vendor benchmark, so measure your own workload.
- Async everywhere. HTTP handlers, middleware, database queries, Redis, queues, S3, SQS and WebSockets are all non-blocking. Blocking work such as bcrypt hashing runs on Tokio’s blocking thread pool.
- Compile-time guarantees. Column names, relationships, validated inputs, authorization checks and secret values are checked by the compiler before code reaches production.
The team also frames it as a framework for the AI era. New apps ship with built-in agent skills that teach coding agents how to write and test idiomatic Laravel Rust. Strict compilers act as guardrails when much of the code is machine-written.
Getting started
Install the new Laravel CLI and create a Rust app:
curl -fsSL https://laravel.com/install.sh | sh
laravel new example-app --rust
If you already have an older laravel CLI or Laravel Herd installed, the installation guide covers PATH setup. You deploy a single compiled binary, either to your own servers or to Laravel Cloud.
Routing
Routes live in src/routes/web.rs and src/routes/api.rs. Closures work for quick endpoints, and route model binding loads a record straight from the URL:
// src/routes/web.rs
use laravel::prelude::*;
use crate::http::handlers::posts;
use crate::models::User;
pub fn routes(route: &mut Router) {
route.get("/greeting", async || "Hello World");
route.get("/users/{user}", async |user: User| user.name);
route.get("/posts", posts::index);
route.get("/posts/{post}", posts::show);
route.post("/posts", posts::store);
}
Visiting /users/42 loads user 42 or returns a 404. URLs are built from handler functions with macros like route!(posts::show, &post), so renaming a path can’t leave broken string URLs behind.
Typed validation
Incoming forms and JSON are plain Rust structs with validation attributes. fills = Post lets the struct fill a Post model:
// src/http/handlers/posts.rs
use laravel::model::create;
use laravel::prelude::*;
use crate::models::{Post, User};
#[laravel::input(fills = Post)]
#[validate(authenticated)]
pub struct StorePost {
#[validate(required, max_length = 255, unique(Post::title))]
pub title: String,
#[validate(required)]
pub body: String,
}
pub async fn store(
Authenticated(user): Authenticated<User>,
Valid(input): Valid<StorePost>,
) -> laravel::Result<Redirect> {
let post = create!(Post { user: &user, ..input }).await?;
Ok(redirect!(show, &post))
}
Several safety rules are built into the types:
- Every input struct must declare who may submit it (
anyone,authenticated, or a custom function), or the code won’t compile. - The handler only runs after validation passes. Browsers are redirected back with errors, and API clients get a 422.
- No mass-assignment bugs.
..inputonly fills the fields declared onStorePost, so extra client fields are ignored. PasswordandPasswordHashtypes keep secrets out of logs and JSON responses.
Models and queries
Models are structs with #[model], and relationships are declared as attributes:
// src/models/post.rs
use laravel::model::{BelongsTo, HasMany, model};
use laravel::time::Timestamp;
use crate::models::{Comment, User};
#[model]
pub struct Post {
pub id: i64,
pub user_id: i64,
pub title: String,
pub body: String,
#[default]
pub votes: i64,
pub published_at: Option<Timestamp>,
pub created_at: Timestamp,
pub updated_at: Timestamp,
#[belongs_to]
pub user: BelongsTo<User>,
#[has_many]
pub comments: HasMany<Comment>,
}
Queries are type-checked, and you combine conditions with &, | and !:
let posts = Post::query()
.filter(
Post::published_at.is_not_null()
& (Post::votes.ge(10) | Post::user_id.eq(user.id)),
)
.order_by(Post::published_at.desc())
.with((Post::user, Post::comments))
.limit(10)
.get()
.await?;
That compiles to parenthesised, parameterised SQL: where "published_at" is not null and ("votes" >= $1 or "user_id" = $2). One deliberate difference from Laravel PHP: relationships are never lazy-loaded silently. You load what you need with with, which rules out accidental N+1 queries.
For raw SQL, db::query! captures Rust variables inside braces. It turns each capture into a bound parameter at compile time, never string concatenation:
use laravel::db;
let roles = vec!["admin", "editor"];
let users = db::query!(
"SELECT id, name FROM users WHERE active = {active} AND role IN ({...roles})"
)
.select_as::<UserSummary>()
.await?;
Migrations are Rust files compiled into the binary, so a production server can run migrate without shipping source code. The schema builder targets PostgreSQL, MySQL, MariaDB and SQLite.
Queues and concurrency
A job is a struct that derives Queueable, with a handle method in a #[job] block. Jobs are discovered automatically:
use laravel::container::Inject;
use laravel::queue::{Queueable, job};
use crate::models::Podcast;
use crate::services::AudioProcessor;
#[derive(Queueable)]
pub struct ProcessPodcast {
pub podcast: Podcast,
}
#[job]
impl ProcessPodcast {
async fn handle(self, processor: Inject<AudioProcessor>) -> laravel::Result<()> {
processor.process(&self.podcast).await?;
Ok(())
}
}
// dispatch from anywhere
ProcessPodcast { podcast }.dispatch().await?;
As in PHP Laravel, only the model’s primary key is serialised, and a fresh record is loaded before handle runs. Queue drivers cover the database, Redis, SQS and Laravel Cloud’s managed queues.
For work inside one request, laravel::task runs independent calls at the same time:
let (users, orders) = task::try_join!(
db::table("users").count(),
db::table("orders").count(),
)?;
There are also durable workflows (multi-day flows written as one async function), mail, WebSocket broadcasting with a bundled Reverb server, full Inertia support for React, Vue and Svelte, and automatic OpenTelemetry tracing.
Testing
Each #[laravel::test] boots an isolated in-memory app, so you can test the full HTTP stack without a server:
use laravel::testing::prelude::*;
#[laravel::test]
async fn guests_cannot_publish_posts(app: Application) {
app.post("/posts")
.form([("title", "Hello"), ("body", "World")])
.await
.assert_redirect_to("/login");
}
Should you try it?
Good fits right now: new internal tools or side projects, high-traffic APIs where PHP’s per-request model is a cost problem, and teams that already know Rust and miss Laravel’s batteries-included style.
Wait if: you need production stability today (it’s a beta), you rely on Laravel PHP packages (they don’t run in Rust), or your team would be learning Rust and a new framework at the same time.
Laravel PHP isn’t going anywhere. The team says it remains fully maintained. Laravel Rust is a second option, not a replacement.
Takeaway
Laravel Rust gives Rust developers Laravel’s conventions with compile-time safety: typed validation with required authorization, query building checked by the compiler, no lazy loading, and SQL-injection-safe raw queries. Try it with laravel new example-app --rust, read the documentation, and send feedback during the beta window.
