~/beer-and-code
▪ next event Workshop: Segurança com IA · 14 Dec · 19h — duração de 2 horas, ao vivo via Google Meet save your seat ›
~ / news / laravel-rust-laravel-go-php-devs $
News

Laravel Rust and Laravel Go: what changes for PHP devs and how to learn both with AI

LS Lucas Souza · · 12 min read
Laravel Rust and Laravel Go: what changes for PHP devs and how to learn both with AI

Laravel Rust and Laravel Go are the official versions of the Laravel framework for the Rust and Go languages, released in beta by Laravel itself on December 1 and 2, 2026. For more than ten years the framework was a synonym for PHP. In two days, it became three.

Every PHP dev asked the same question next: do I need to migrate?

I had never written a line of Rust or Go. So I ran the most honest test I know: I took the three stacks from scratch, built the same project on all three with AI, shipped them to production and threw 12,000 people at them trying to buy tickets at the same time. This post sums up what that opens up, what the numbers showed and how to use AI to learn two new languages without stopping delivery.

TL;DR

  • What it is: Laravel Rust and Laravel Go are official full-stack frameworks with routing, middleware, models, queues, mail and Inertia, written idiomatically in each language.
  • Test stack: Laravel PHP, Laravel Rust and Laravel Go with Inertia, MySQL, Nginx, GitHub Actions, k6 and Claude Code.
  • Cost/Access: open source, in 0.x beta. APIs can still break before 1.0.
  • Result: with no external latency, Rust did 150 sales per second, Go 96 and PHP 90. With 50 ms inside the transaction, it was a tie: 18, 17 and 19.
  • Repositories: flash-sales-rust, flash-sales-go and flash-sales-php.

What Laravel shipped and why now

Laravel Rust came out on December 1, built on Axum and Tokio. Laravel Go came out the next day, directly on top of net/http and goroutines from the standard library, with no third-party framework underneath. Neither is a line-by-line port of the PHP version. The Rust announcement says outright that it is not "a blind port of Laravel to Rust".

The stated reason is AI. The Rust post says "humans will increasingly neither write nor manually read application code at scale". The Go post asks: "In the AI age, why not write in very fast, type-safe, compiled languages?". Both frameworks create new apps with built-in agent skills to guide the coding agent.

In plain terms: PHP's friendly syntax was always an argument for humans. If the agent is the one typing, the learning curve of a compiled language weighs less, and what it delivers (performance, strong typing, a single binary) comes almost for free.

The official numbers are aggressive. In Laravel's own benchmark, running on Laravel Cloud, the same app did 1,774 requests per second in Rust against 97 in PHP. The cost shows up in the build: about three minutes for a cold build in Rust against 27 seconds in PHP. And for anyone getting nervous, the same post says: "If you write PHP, nothing changes. Laravel PHP is fully maintained and supported."

I wanted to see this outside a slide. The whole process, from the failed install to the load test, is on video (in Portuguese):

Full video: Laravel PHP x Rust x Go: I built the same project on all 3 stacks and tested it with 12,000 users

What Laravel Rust and Laravel Go open up

Your Laravel knowledge now works in three languages. I opened the Rust project and recognized almost everything: routes/web.rs and routes/api.rs, handlers instead of controllers, models, migrations, Inertia::render calling a React component. app/ became src/. In Go the structure changes more (there is no app folder, handlers live at the root and everything that runs has to be listed in bootstrap/app.go), but the request lifecycle is the one you already know.

Deploy becomes shipping a binary. On the two new stacks, my GitHub Actions workflow compiles, sends the executable to the VPS and Nginx serves it. No PHP-FPM, no composer install on the server. I keep one directory per release so I can roll back fast if something ships broken.

Polyglot architecture without switching mental models. The endpoint that gets hammered on Black Friday can move to Rust. The admin stays in PHP with Filament. Both ends follow the same conventions, and the team does not have to learn two frameworks.

The compiler as a reviewer for the agent. AI-generated code in a typed, compiled language fails at compile time, not at three in the morning in production. If you work with agents, that is one more layer of guardrail.

I did not figure any of this out alone over one heroic weekend. The harness I used to spec and build the three projects, BC Harness, was developed together with the people in Clã Beer and Code, our paid community and the place where this kind of test turns into an architecture discussion every week, live. Learning a new stack with more people hitting the same walls at the same time is faster, and the rest of this post shows the process.

How to use AI to learn Rust and Go without stopping delivery

My starting point was zero. What worked was five habits, in this order.

1. Ask for a translation into what you already know

I installed Rust, saw two new binaries and, before any tutorial, opened Claude Code:

Explain what rustc and cargo are, comparing them with what I already use in PHP.

The answer clicked right away. rustc is the compiler, which produces a native binary. cargo is the package manager and build tool, the role Composer plays. Cargo.toml is your composer.json and Cargo.lock is your composer.lock. You do not need a course to get started. You need a map between what you know and what is new.

2. Treat every error as a lesson

I created the project and ran the migration against MySQL:

laravel new flash-sales-rust --rust
cd flash-sales-rust
laravel migrate

Error: the MySQL driver was disabled. Laravel Rust ships with Postgres by default, and in the database docs each driver is a Cargo feature. The fix is one line in Cargo.toml:

laravel-rust = { version = "0.1", features = ["database-mysql"] }

In Go, the same problem has a different fix, and that alone teaches you how the languages differ. Drivers are packages, registered in bootstrap/app.go:

Drivers: []db.Driver{mysql.Driver},

Go also gave me a compile error right when creating the project. Without knowing the language, I was stuck. I pasted the error into Claude, it fixed it, and then I asked for an explanation of what had happened. That second part is the one that matters. Fixing without understanding is outsourcing your thinking.

3. Write the spec before generating code

On all three projects I ran the same Spec Driven Development flow with BC Harness: project description, user stories, database modeling and phasing. The harness is annoying on purpose. It asks how the price is stored (integer, in cents), what the API contract is, how many tickets go into the seed.

This is the stage where mistakes are cheap. Once the code exists, changing it is expensive, even with AI. And when you do not know the language, the spec is the only part of the project you can review with confidence. If the harness concept is new to you, start with what an AI harness is.

4. Let the loop run with tests as the judge

With the phases defined, I did not ask for tasks one by one. I had Ralph Loop implement phase by phase, using the stack's own test command as the definition of done (cargo test in Rust). It was 8 phases and 37 tasks in Rust, 8 phases and 36 tasks on the other two. Rust finished in 55 minutes. I was asleep.

Tests are what let you trust code you cannot read well yet. Without them, an autonomous loop in a language you do not know is a gamble.

5. Read the code along the request lifecycle

With everything done, I read the result following the path I already follow in PHP: route, handler, validation, model, response. In Rust, routes/api.rs points to a checkout handler, which validates the email, opens the transaction and returns the response. The architecture is familiar, so the only new thing on screen is the syntax. That is how it sinks in.

I will be honest: Rust code is hard to read on first contact. There are operators I had never seen and a match I had to look up. Go is easier on the eyes for someone coming from PHP. Even so, I came out leaning toward Rust, because the environment worked on the first try and the structure sat closer to the Laravel I know.

One detail that validates the process: there were three separate specs, in three languages, and the architecture pattern held across all three.

▪ Clã Beer and Code

Do not just follow the news — master it. Hands-on AI Engineering, live, every week, in the largest community in Brazil.

Join the Clã

The load test: 12,000 people, 10,000 tickets

The project is a flash sale checkout screen: email, quantity and a live stock counter. The scenario, run with k6:

  • ARM64 VPS with 4 CPUs and 24 GB of RAM, Ubuntu and Nginx.
  • Separate MySQL HeatWave instance, with 1 CPU and 8 GB of RAM.
  • 10,000 tickets, 2 per purchase, 12,000 people arriving, 500 browsing at the same time.
  • Checkout with SELECT ... FOR UPDATE, no simulated payment.
  • Three rounds per stack. A pass requires zero 500 errors and zero duplicate sales.

All three passed. The summary:

Metric Rust Go PHP
Sales per second 150 96 90
Time holding the lock per sale 6.7 ms 10.4 ms 11.1 ms
Purchase flow 500 ms 864 ms 1.6 s
Page load, worst case ~5 s 9.9 s 5.4 s

Rust won sales comfortably. Note that the gap to PHP was 1.7x, far from the 18x of the official benchmark, because here the ceiling is the database and not the framework. And PHP held its ground on page rendering.

Then I ran the test that matters. I put 50 ms of latency inside the transaction, simulating a call to a payment gateway:

Metric Rust Go PHP
Sales per second 18 17 19
Time holding the lock per sale ~56 ms ~56 ms ~56 ms

A tie. Fifty milliseconds erased the entire language advantage.

The reason is simple. With the lock holding the stock row for 56 ms, about 18 sales fit in a second, no matter how fast the code around it is. What limits scale here is an architecture decision: an external integration inside the transaction. The way out is the same on all three stacks. Reserve the stock in a short transaction, send the payment to a queue and confirm the sale afterwards.

Language performance is the icing. The cake is the system design.

Limitations and things to watch

  • It is beta. Both docs warn that releases before 1.0 may bring breaking changes. Laravel talks about calling Rust stable after six to eight weeks of feedback. I found no date for Go.
  • Three frameworks to maintain. Laravel always maintained one. Now there are three languages evolving at different paces, plus the ecosystem around them. It is not yet clear how the team will split, and this is my biggest market concern.
  • My test is simple. One screen, one VPS, one database. The latency run had a single round and a thousand requests. It is enough to show the effect, not to pick your company's stack.
  • Not knowing the language costs you when things break. AI got me out of the hole during the Go install, but in production, in an incident, you are the one answering. Using AI to build does not excuse you from learning the syntax.
  • Ecosystem. Packages like Filament do not exist on the other side. Migrating a real app today means rewriting what the PHP ecosystem gives you ready-made.

Quick FAQ

Should I migrate my application to Laravel Rust today?

No. The framework is in beta, the ecosystem does not exist yet and the real gain depends on your architecture. In my test, a 50 ms integration inside the transaction wiped out the difference between the three stacks. Fix the design first.

Is Laravel PHP going to die?

Laravel says no: PHP remains "fully maintained and supported". What changes is that PHP stops being the only way into the framework. For most products, it still delivers what you need.

Laravel Rust or Laravel Go: which one should I learn first?

It depends on your goal. Go has simpler syntax and compiles faster. Rust had the smoother install in my test, the structure closest to Laravel PHP and the best sales-per-second number. My personal bet is on Rust.

Do I need to know Rust to use Laravel Rust with AI?

To get started, no. With a spec, tests and an agent, I put an app in production without knowing the language. To maintain it, yes: you need to be able to read what the agent wrote and understand the error when it shows up.

Conclusion

Laravel Rust and Laravel Go are not a reason to migrate. They are a reason to learn, and learning got cheap. In a few hours, with AI, I went from zero to three apps in production and a benchmark that taught me more about architecture than about languages.

My plan is to wait for the framework to mature and, at some point in 2027, evaluate migrating some of our applications to Rust. Until then, the work that pays off is the usual: get integrations out of transactions, use queues, measure before switching stacks.

If your application does not scale today, the answer is probably not in the language. Keep going here: Is Laravel slow? Why your application does not scale.

Lucas Souza
Written by
Lucas Souza

{AI Engineer} — apaixonado por Laravel, arquitetura de software e construir produtos com impacto. Compartilho aqui tutoriais, descobertas e reflexões sobre o dia a dia de engenharia.

▪ Clã Beer and Code

There is no shortage of content. What is missing is someone to untangle it: what matters now is how to implement it the right way. In the Clã you get that live, every week, with people who have already filtered out the noise.

Join the Clã
Meet the Clã Beer and Code
playing