If AI can write Rust, why do we need Laravel Rust?
There’s an interesting conversation happening around software development these days.
We’ve reached a point where you can ask an AI coding agent to build something in a programming language you barely know. It can read the documentation, install dependencies, write the code, wire things together and get an application running.
You don’t necessarily need to understand every language or framework before building something with it anymore.
In fact, a common discourse these days among the developer community is that programming languages are becoming less important. If an AI agent can write Rust, Go, PHP or TypeScript for you, why should the language you personally know matter that much?
This brings me to something Laravel announced recently. Laravel Rust, a batteries-included web framework for Rust that brings many of the conventions and ideas familiar to Laravel PHP developers into a completely different language.
So, let me reiterate the question.
“If AI can already build an application in Rust from scratch, why would we need Laravel Rust in the first place?”
Can’t an AI agent simply put together a router, an ORM, authentication, queues and everything else an application needs?
It certainly can. But I think that’s precisely why something like Laravel Rust makes sense.
Laravel was never just about PHP
Before getting into the Rust implementation, I think it’s worth looking at what made Laravel popular in the first place.
Laravel has always been more than a collection of PHP packages.
When you start a Laravel application, you don’t have to spend your first few hours deciding which routing library to use, how to structure authentication, which ORM to pick, how to handle database migrations or how to wire up a queue system.
Most of those decisions have already been made. You get a coherent set of tools that are designed to work together.
Need to define a route? You have the routing system.
Route::get('/posts', [PostController::class, 'index']);
Need to retrieve some records? There’s Eloquent.
$posts = Post::where('published', true)
->latest()
->get();
Need to dispatch something to a queue? Dang! that’s already part of the framework.
SendNewsletter::dispatch($user);
These are relatively small (and trivial) examples really, but they illustrate something important.
Laravel gives developers a predictable and consistent way to approach common application problems. You don’t have to reinvent the same building blocks every time you start a project.
It also means developers who are familiar with Laravel can move between projects without having to (re)learn an entirely different architecture.
Over the years, this philosophy has become a significant part of Laravel’s identity. And that’s exactly what, I believe, Laravel Rust is attempting to bring to Rust.
Meet Laravel Rust
Laravel Rust is an open-source, batteries-included web framework built in Rust.
The idea isn’t to translate Laravel PHP into Rust line by line. Instead, it brings the familiar Laravel philosophy to a language with a very different set of characteristics.
It includes many of the building blocks you’d expect from a modern web framework:
- Routing and middleware.
- Validation and authentication.
- An ORM and query builder.
- Database migrations and seeding.
- Queues, job chains and batches.
- Scheduling.
- Events and broadcasting.
- Storage, mail and notifications.
- Inertia support for React, Vue and Svelte.
- Testing utilities and OpenTelemetry traces.
If you’ve worked with Laravel PHP (funny Laravel isn’t associated only with PHP anymore), you’ll already feel at home with many of these concepts.
For instance, Laravel Rust includes an ORM, query builder and migration system, much like Eloquent and Laravel’s database tooling.
It also supports Inertia, which is particularly interesting because it allows developers to build modern frontend applications without having to introduce a completely separate API layer for every application.
There are familiar ideas here, but the implementation is designed around Rust rather than trying to reproduce PHP’s programming model.
Taylor Otwell mentions that he designed the APIs by asking what the most Laravel-like approach would be in Rust, while leaving out legacy pieces (like Soft Deletes) that don’t make sense for the language or AI-assisted development.
Another interesting aspect is that the entire application compiles into a single binary. That gives Laravel Rust a rather different deployment model from what Laravel PHP developers are accustomed to.
You can explore the framework and its features in the official Laravel Rust documentation.
But can’t AI build all of this from scratch?
This is where I think the announcement gets quite interesting and it even sparked some divided opinions.
If AI coding agents can generate applications in languages we don’t know, why do we need opinionated frameworks at all?
An agent can certainly create a Rust application using Axum or Actix Web, select an ORM, add authentication, configure queues and connect everything together.
It can even do a reasonably good job of documenting the resulting architecture. But there’s a difference between being able to generate something and having a reliable foundation to generate it on.
Think about authentication, for instance. You could ask an AI agent to implement authentication from scratch. It could generate password hashing, session handling, token validation and middleware.
But should every new application have to reinvent these pieces? Should every coding agent independently decide how authentication should work, how permissions should be enforced and how sensitive information should be handled?
I don’t think so.
Authentication, authorization, encryption and other foundational parts of an application are things you want to get right consistently. They’re not particularly interesting problems to solve from scratch every time.
This is one of the arguments Taylor makes in the Laravel announcement, and I think makes a lot of sense.
AI makes it easier to generate code, but it doesn’t automatically make the generated code a reliable foundation. A batteries-included framework provides tested building blocks, established conventions and APIs that developers and coding agents can work with.
Instead of asking an agent to invent an architecture for every new project, you can give it an established architecture to work within.
Frameworks might become more useful in an AI-assisted world
There’s something slightly ironic about the idea that AI would make frameworks less relevant.
For years, frameworks have existed partly to reduce the amount of repetitive code developers need to write. They provide abstractions around common problems, establish conventions and help teams avoid making the same architectural decisions repeatedly.
AI is now doing something similar at the code-generation level. But that doesn’t mean the underlying need has disappeared.
In fact, I think the opposite could happen. When code becomes cheaper to generate, the cost of maintaining inconsistent, poorly structured and unnecessarily complicated codebases becomes more noticeable.
Imagine asking two different AI agents to build the same application in Rust without any framework or established conventions.
Both might produce perfectly functional applications. But they could end up with entirely different architectures, dependency choices, error-handling strategies and project structures.
Now imagine giving both agents the same Laravel Rust foundation.
They have a common set of conventions to follow. They know where routes belong, how models are defined, how migrations work and how background jobs are dispatched. The framework becomes a shared vocabulary between the developer and the AI agent.
This is particularly useful when multiple developers and agents work on the same codebase. They don’t have to repeatedly negotiate architectural decisions because the framework has already established many of them.
All-in-all, frameworks aren’t just helping developers write less code. They’re helping ensure that more code gets written in a consistent way.
Why Rust, though?
There’s also a practical reason why I think Laravel has chosen Rust for this experiment.
Rust offers memory safety without a garbage collector, strong compile-time guarantees and excellent performance characteristics.
These properties make it particularly attractive for applications where resource efficiency and predictable execution matter.
Laravel’s own announcement includes some interesting benchmarks.
On Laravel Cloud, Laravel Rust handled 1,774 requests per second compared to 97 for Laravel PHP on the same instance size.
At a steady 50 requests per second, it reportedly used around 4% CPU compared to 52% for Laravel PHP.
Of course, these are Laravel’s own benchmarks, and they shouldn’t be treated as a universal comparison between PHP and Rust. Application characteristics, deployment configuration and workload can significantly influence the results.
There’s also a trade-off worth mentioning: the reported cold build time for Laravel Rust was around three minutes, compared to 27 seconds for Laravel PHP.
Rust’s compile-time checks and compilation process come with their own development experience.
Still, these numbers give us an idea of what Laravel is trying to achieve.
It’s bringing the productivity and conventions of a familiar framework to a language that offers a different performance and safety profile which is great for certain kinds of applications.
Laravel isn’t abandoning PHP
One thing I particularly appreciate about this announcement is that Laravel isn’t positioning Rust as the replacement for its PHP framework.
Laravel PHP continues to be maintained and supported.
The team is effectively acknowledging that different languages can make sense for different kinds of projects, while the philosophy behind Laravel doesn’t have to be restricted to one of them.
This also makes sense when you look at the broader Laravel ecosystem.
Laravel Cloud is expanding its support to frameworks and languages beyond Laravel PHP, including Rails, Django, Go, Node.js and Rust.
The idea is to give developers a common deployment platform without requiring them to use the same framework for every application.
You could have your main Laravel PHP application, a Rust service handling a particularly demanding workload and a Next.js frontend, all deployed through the same platform.
That’s a more interesting direction than trying to convince everyone that one language or framework should be used for everything.
So, PHP is not dead yet (at least, for now).
A framework gives AI something to work with
The argument that AI can write code in any language is largely true. But being able to generate code in a language doesn’t mean we should start every project from an empty directory.
We still need conventions. We still need tested abstractions. We still need sensible defaults and a predictable architecture.
If anything, those things become more important when code is being generated at a much faster pace. A framework gives an AI agent a set of established decisions to build upon instead of leaving it to make every decision independently.
And I don’t think that’s limited to Laravel or Rust.
It’s an interesting direction for frameworks in general. Perhaps the next generation of frameworks will increasingly be designed with both human developers and AI coding agents in mind.
Not because developers are no longer writing code themselves, but because the way we produce software is changing.
Laravel Rust is still in beta, so there’s plenty to learn about how it evolves and how well its ecosystem develops.
But I like the idea behind it. Laravel started as a PHP framework, but the philosophy that made it useful was never exclusive to PHP and I like that the team is exploring how to bring that philosophy to a language like Rust.
👋 Hi there! This is Amit, again. I write articles about all things web development. If you enjoy my work (the articles, the open-source projects, my general demeanour... anything really), consider leaving a tip & supporting the site. Your support is incredibly appreciated!