Laravel Rust: what is it, and what happens to Laravel PHP?

The first beta of Laravel Rust came out today. It is a new web framework from the Laravel team, written in Rust. Laravel PHP stays, so there are now two frameworks side by side. If you run a PHP project, you don't have to rewrite anything.

I haven't tried it yet. This article is based on the official announcement, the documentation and Laravel's own benchmark.

The short version

  1. The announcement requires no changes to your PHP app. Keep updating it as before.
  2. Laravel Rust is in beta. According to the documentation, releases before 1.0 may change APIs and configuration, so factor that in before you build a production system on it.
  3. If you're curious, try it on a small, separate app or an internal tool.
  4. Only consider a rewrite for performance after you have measured that PHP really is your bottleneck.

What is Laravel Rust?

Rust is a compiled language: your code becomes an executable, and the compiler catches many mistakes before it ever runs. You could already write web apps in it, but you usually had to pick and wire together the router, the database layer, the queue and authentication yourself.

Laravel Rust ships those together, following the ideas you know from Laravel. It is built on the Axum and Tokio libraries, and according to the announcement it includes, among other things:

  • routing, middleware, validation, sessions, authentication and authorization;
  • models, a query builder and migrations (PostgreSQL, MySQL, MariaDB and SQLite, with PostgreSQL as the default);
  • queues, a scheduler, mail, notifications and WebSockets;
  • durable workflows, which can span days: completed step results are saved, and the workflow resumes after a wait or a restart;
  • Inertia with React, Vue or Svelte, or server-rendered views.

Taylor Otwell says it is not a blind port but Laravel reimagined in idiomatic Rust. It may look familiar, but the code is different: a model is a Rust struct, and views use Jinja syntax. If you use Laravel's typed request validation, the input type has to declare who may submit it, otherwise the program doesn't compile.

Are there two Laravels now?

Yes. Laravel's announcement is clear: if you write PHP, nothing changes, and Laravel PHP is fully maintained and supported. On the same day they also released two new AI tools for PHP, Agent Kit and Converse.

According to the launch post, the Rust version is already near feature parity with Laravel PHP, with the remaining small gaps to be closed in the coming weeks. That is the vendor's claim about the framework's built-in features. It doesn't make your PHP packages, or your own code, work in Rust.

I found no conversion tool in the announcements or documentation I read. Whatever you move from your PHP app to Rust has to be rewritten.

Why did they build it?

They give two reasons. One is speed. The other is AI: Laravel expects coding agents to write more and more of the code, and in that setting a strict compiler, firm conventions and built-in foundations are worth a lot. That's why new apps ship with instructions for agents (AGENTS.md, CLAUDE.md and skills).

The official FAQ says knowing Rust helps, but the framework is built for a future where agents write most of the code. In production you still need someone who understands what the code does when it fails.

What did Laravel measure?

In Laravel's own benchmark, every app ran on the same size of instance (Pro 4 GiB) and got a load that ramped up over 20 minutes. Taking each app's own best 10-second window without failed requests, Rust served 1,774 requests per second and PHP 97. That's where the "18x" comes from.

A second test sent a steady 50 requests per second for five minutes:

  • median latency (in the busiest 10-second window) was 62 ms for Rust and 78 ms for PHP;
  • the highest CPU usage recorded during the run was 4.2% and 52.4%;
  • the highest memory usage was 16 MB and 134 MB.

So the latency gap is 16 ms and the CPU gap is much larger. It can show up on your server bill if the lower resource use actually lets you run on a smaller machine. If the lower resource use lets you run on a smaller instance, hosting may cost less. The benchmark measured resource use, not cost.

Check the conditions before drawing conclusions:

  • a Laravel employee ran the test, on Laravel Cloud;
  • it used two read-only endpoints (80% of requests fetched a list, 20% a single post), with 200 posts and 10 authors in MySQL;
  • according to the benchmark repository, the PHP app ran Laravel 13 on PHP 8.5, served by Octane on FrankenPHP with four workers;
  • the author notes that results for more complex apps will be different.

The speed also has a price: across 100 cold builds each on Laravel Cloud, the median build phase took 3 minutes 1 second for Rust and 27 seconds for PHP.

If a page is slow for you, first find out where the time goes. A missing database index or a slow external API stays slow in Rust.

What could you use it for?

These are worth testing with your own measurements:

  • a new, smaller service with many concurrent connections or a lot of waiting on external calls;
  • processing where CPU or memory is the limit (Laravel's benchmark didn't test background jobs);
  • a team that already uses Rust and has been assembling the web basics by hand.

The benchmark author suggests you could keep most of an app in PHP and move only the busiest parts to Rust. On Laravel Cloud, both apps can use the same database if they are in the same organization and region. Sharing a database doesn't make them compatible, though. Check whether they can read each other's sessions and encrypted data, and process jobs the other one queued. Also decide which app's migrations own the schema.

For an ordinary company website, web shop or internal admin, the announcement alone is no reason to switch.

How do you try it?

According to the installation guide, you need Rust 1.99 or later, the Node.js LTS release and Git. To install the command line tool on macOS or Linux:

bash
curl -fsSL https://laravel.com/install.sh | sh

This runs a downloaded script. To look at it first, save it (curl -fsSL https://laravel.com/install.sh -o install.sh), read it, then run sh install.sh. Open a new terminal and check that you get the right command:

bash
laravel --version

The output should start with Laravel CLI. If it prints another installer's version, Laravel Herd or the older Composer-based laravel command is ahead of ~/.laravel/bin on your PATH. which -a laravel shows where each one is. Move ~/.laravel/bin ahead of them, open a new terminal and run laravel --version again. Then:

bash
laravel new example-app --rust
cd example-app

By default the app expects a local PostgreSQL server and a database named laravel. Start PostgreSQL and make sure the credentials in DATABASE_URL in .env work. If the database doesn't exist yet, migrate offers to create it, which needs a role that is allowed to create databases. To use SQLite or MySQL instead, also replace the database-postgres feature in Cargo.toml.

bash
laravel migrate
laravel dev

If all goes well, the app is at http://127.0.0.1:8000. I took these commands from the documentation and haven't run them myself.

When will it be stable?

Laravel plans to call it stable after about six to eight weeks of feedback. Counting from the December 1 announcement, that falls around mid to late January 2027. Laravel hasn't announced a date. Until 1.0, read what changed before every upgrade.

If you are seriously considering it after that, check whether the integrations you need exist in Rust (payments, invoicing, your company systems) and who will maintain the code, and benchmark it with a workload typical of your app.

Need a hand?

If you're wondering whether Rust or something simpler would fix a slow Laravel app, I can help you find where the time goes and what is worth doing. Get in touch.


Sources

All articles →