Post

Laravel Rust beta: Laravel’s philosophy in Rust, and the real cost of 18× throughput

Laravel Rust entered beta on December 1, 2026. Axum/Tokio architecture, compile-time models and validation, durable workflows, setup, and the limits of the 18× benchmark.

On December 1, 2026, the Laravel team shipped the first beta of Laravel Rust. It is the most complete official move of the Laravel philosophy beyond PHP: routing, middleware, sessions, authentication, an ORM, queues, mail, workflows, and testing helpers under one roof, written in Rust.

Taylor Otwell’s launch post is clear about what this is not: “Laravel Rust is not a blind port of Laravel to Rust.” It is not a bridge that translates PHP code into Rust. It is Laravel reimagined around Rust’s type system and AI-assisted development. This article covers what launched, how the framework is put together, how it is used day to day, and what the 18× benchmark claim does not cover.

Quick summary

Field Value
Release First beta, December 1, 2026
Foundation Axum + Tokio, async end to end
Requirements Rust 1.99+, Node.js, Git
Database PostgreSQL by default; MySQL, MariaDB, SQLite
Frontend Inertia React/Vue/Svelte, SSR; server-rendered views
Scope Auth, typed validation, ORM, migrations, queues, durable workflows, Reverb, mail, OpenTelemetry
Benchmark 1,774 RPS in the best 10-second window; Laravel PHP 97 RPS
Cost Cloud cold build ~3 minutes; Laravel PHP ~27 seconds
Status Beta; breaking changes are possible before 1.0

A Laravel Rust request moving from the Axum route through typed handlers, ORM, and queue layers

What happened?

Laravel Rust is not replacing Laravel PHP. Laravel PHP remains fully supported. The new framework brings the same conventions and batteries-included approach to Rust. According to the official launch post, it is near feature parity with Laravel PHP, with the remaining small gaps expected to close over the coming weeks. The team plans to call it stable after roughly six to eight weeks of feedback.

The motivation is not only speed. Laravel is betting on a period in which AI writes more application code and humans read less of it line by line. In that world, strong compiler checks, clear conventions, and tested security primitives matter more than loose dynamic runtimes. Every new Laravel Rust application ships with built-in agent skills that teach coding agents how to write and test idiomatic Laravel Rust.

Laravel Cloud changed too: the platform now runs Rails, Django, Go, and Rust apps. Laravel Rust gets managed queues and scale-to-zero. An application can run as a compiled binary on your own servers or as a managed app on Laravel Cloud.

How is it built?

Axum + Tokio, async all the way down

Laravel Rust is built on Axum and Tokio. HTTP handlers, middleware, database queries, the HTTP client, Redis, queues, S3, SQS, and WebSockets are all non-blocking. CPU-bound work such as bcrypt hashing and local disk I/O is offloaded to Tokio’s blocking thread pool.

In practice, while one request waits on a slow database query, a third-party webhook, or a long-running AI API call, the same threads keep serving other requests and queue jobs. The official documentation describes a handful of threads serving thousands of concurrent requests.

The application compiles into a single Rust binary. Migrations compile into the binary as well; build.rs rebuilds the app when you add a migration. That means a deployed server can run migrations without shipping the source files.

The type system is the real safety layer

The most interesting part of Laravel Rust is how it combines Laravel habits with Rust’s compile-time checks. Database column names, relationships, validated form inputs, authorization checks, and secret values are verified before the code reaches production.

Models declare relationships with #[belongs_to] and #[has_many]; queries check column names, operators, and value types at compile time. The launch post highlights a deliberate choice: relationships are never silently lazy-loaded. A page loads what it needs up front with with(...), which prevents accidental N+1 queries by design.

On the validation side, form and JSON payloads are Rust structs. Every input struct must declare who may submit it: anyone, authenticated users, or a custom authorization function. If that declaration is missing, the code does not compile. The handler runs only after validation passes. A fill via ..input writes only the columns declared on the struct, which closes off mass-assignment bugs by construction.

Laravel conventions, Rust macros

Laravel Rust keeps Laravel’s names and flows but expresses them through Rust macros and types:

  • #[model] for ORM models
  • #[laravel::input] and #[validate(...)] for form structs
  • create!, update!, and redirect! for writes and redirects
  • route! for compile-time-checked URL generation
  • #[job] for automatically discovered queue jobs
  • #[workflow] for durable workflows
  • db::query! for raw SQL with automatic parameter binding

The goal is not to imitate PHP syntax. It is to turn the same developer experience into errors the Rust compiler can catch. A route URL is not a hand-written string, so renaming a handler cannot leave a broken link behind. Values inside db::query! are not concatenated into the SQL string; they become real bound parameters.

Designed for AI

The “AI-first” claim could sound like marketing, but it has a technical shape. The agent skills shipped with the app tell a coding agent where files belong, which macro to use, and how to run tests. The compiler rejects bad code early. The combination is positioned as a guardrail against re-creating auth, validation, and encryption from scratch in every project.

How do you use it?

You need Rust, Node.js, and Git. Laravel Rust requires Rust 1.99 or later. Then install the Laravel CLI and create an app:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
curl -fsSL https://laravel.com/install.sh | sh

laravel new example-app --rust
cd example-app
laravel migrate
laravel dev

laravel new normally asks which language you want; --rust skips the question. The new app comes with Inertia, React, TypeScript, Tailwind, and Vite Plus. PostgreSQL is the default database. To use SQLite or MySQL, change the database-postgres feature in Cargo.toml.

laravel dev starts the application, a queue worker, and Vite Plus together. For production, build the frontend and run the binary in release mode:

npm run build
cargo run --release

The directory layout feels familiar: routes in src/routes/web.rs and src/routes/api.rs, handlers in src/http/handlers/, models in src/models/, migrations in database/migrations/, jobs in src/jobs/, and workflows in src/workflows/.

A basic route file looks like this:

// 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);
}

A request to /users/42 loads user 42 and passes it to the handler; a missing user returns 404. Larger endpoints move into handler modules.

Typed validation and form structs look like this:

// 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))
}

Valid<StorePost> makes sure the handler only sees data that passed validation. A browser form with errors gets redirected back with messages; an API request gets a 422 JSON response.

Model queries are type-checked too:

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?;

Queue jobs use #[derive(Queueable)] and #[job]; dispatch them with ProcessPodcast { podcast }.dispatch().await?. Laravel serializes only the model’s primary key and reloads a fresh record before handle runs.

Durable workflows let you write multi-day flows as one async function:

#[workflow]
impl OnboardUser {
    async fn handle(self, run: &Run) -> laravel::Result<()> {
        run.step("send welcome email", self.send_welcome_email()).await?;

        run.sleep(3.days()).await?;

        if run.step("count projects", self.count_projects()).await? == 0 {
            run.step("send tips", self.send_tips()).await?;
        }

        Ok(())
    }
}

Workflows run on existing queue workers; there is no separate orchestration service. Each step runs once, its result is saved, and a sleeping run consumes no worker resources. A run can resume cleanly across deployments and worker restarts. That matters for onboarding, payment approvals, and other flows that span days.

For the frontend, Laravel Rust supports Inertia with React, Vue, and Svelte, including deferred and live props, prefetching, polling, flash data, and SSR. It also has server-rendered views and templates. A Rust implementation of Reverb ships with the framework; enable the reverb feature and run laravel reverb:start for local WebSocket development.

The 18× benchmark: what it says and what it doesn’t

Laravel’s benchmark compares six frameworks on the same simple API: Laravel Rust, Laravel PHP, Django, Rails, Rocket, and Beego. k6 ramps from 1 request per second to 2,000 over 20 minutes. The apps run on a Pro 4 GiB instance, with MySQL on a separate Pro 4 GiB instance. The dataset is intentionally small: 200 chirps and 10 authors.

Metric Laravel Rust Laravel PHP
Best 10-second throughput 1,774 RPS 97 RPS
CPU at 50 RPS ~4% ~52%
Median scale-to-zero wake 154 ms 712 ms
p95 platform restore 257 ms 886 ms
Median Cloud cold build ~3 minutes ~27 seconds

The “18×” claim comes from successful request throughput in the best 10-second window. The benchmark ran on Laravel Cloud, published by the Laravel team; it is not an independent third-party test. The app is intentionally simple and read-only. More complex applications, different database sizes, and different traffic profiles will produce different results.

So the correct sentence is not “every Laravel app gets 18× faster.” The correct sentence is: on the same simple API and instance size, in this benchmark’s best window, Laravel Rust reached 1,774 RPS while Laravel PHP stayed at 97 RPS; steady-state CPU was about 4% versus 52%. The build cost is real, too: a Cloud cold build takes about three minutes for Rust versus 27 seconds for PHP.

Limits and who it is for

You cannot apply Laravel Rust to an existing Laravel PHP app like a version upgrade. There is no PHP runtime, Composer, or Blade; the application has to be rewritten in Rust with Rust crates and the Inertia/view layer. Laravel PHP experience makes the concepts familiar, but the language, toolchain, and debugging experience are different.

The beta status matters. Releases before 1.0 may include breaking changes to APIs and configuration. Rust’s compile-time checks improve safety and correctness, but they also increase build times and slow the development loop compared with PHP. The ecosystem is not as broad as PHP’s yet; finding a mature crate for every need may not be as easy as finding a Composer package.

Laravel Rust makes sense when:

  • You are building a new service or product and want to start with Rust
  • CPU or memory cost, tail latency, or scaling is a real problem
  • Multi-day durable workflows and queues are central to the product
  • You want AI agents to write much of the code while the compiler and conventions keep them bounded
  • You want to move only a busy part of an existing Laravel PHP app into a separate Rust service

Moving an existing app as-is is not the promise. Laravel PHP and Laravel Rust can run side by side in the same region against the same database, which keeps a gradual migration open, but it is not lift-and-shift.

Conclusion

The headline is 18×, but that is not the most important part. The real bet is combining Laravel’s conventions with Rust’s type system to create a development surface that can be checked, constrained, and safely generated by AI. Compile-time validation, mandatory authorization declarations, no lazy loading, and migrations embedded in the binary are all decisions aimed at fewer surprises.

The cost is clear too: longer builds, beta maturity, and a break from the PHP ecosystem. Laravel Rust is worth a serious trial for a new, performance-critical service. Moving an existing Laravel PHP app is a different decision; the right question is not “how do I port it?” but “which part am I rewriting, and why?”

Sources