[KongchangAI]
· 4 min read· 2,136 words

Laravel Rewrites in Both Rust and Go: A Framework's Self-Rescue in the AI Era

Laravel Rewrites in Both Rust and Go: A Framework's Self-Rescue in the AI Era

Laravel rewrote in Rust and Go, with the real motivation being the review bottleneck of the AI coding era.

Laravel released Rust and Go versions within two days of each other, both genuine native frameworks rather than PHP ports. Founder Taylor Otwell had AI agents handle about three-quarters of the commits but insisted on deciding every API and naming choice himself. The official 18x throughput claim is broken down as a general benefit of moving from PHP to a compiled language—Rocket and Beego are within 10% in the same chart, and the 4% vs 52% CPU usage is the more valuable metric. The real motivation isn't speed but that AI writes code faster than humans can review it, with the compiler, tamper-proof tests, and framework conventions serving as guardrails. The Rust version took about two months, and the Go version went from first commit to release in just 23 days. Laravel PHP will not be abandoned.

Laravel, the biggest framework in the PHP ecosystem, recently did something that set the entire developer community abuzz: it simultaneously rewrote two new versions in Rust and Go. This isn't a simple port—it's a public experiment about "what use is a framework in the age of AI-written code." According to the YouTube video's author, Laravel officially released Laravel Rust and Laravel Go within two days of each other, and founder Taylor Otwell laid almost the entire decision-making process bare on the internet.

Two New Frameworks, Two Language Philosophies

Let's clarify one fact first: Laravel Rust is a genuine Rust framework, and Laravel Go is a genuine Go framework—not shells translated from PHP. According to the video's paraphrase of Taylor's own words, AI agents did write most of the commits, but he insisted that "I personally went through every API, every naming choice, every decision," repeatedly asking "what's the most Laravel way to do this in Rust."

The two have completely different technical foundations. Laravel Rust is built on Axum and Tokio, making heavy use of macros and compiler capabilities; Laravel Go is built directly on Go's standard library net/http and goroutines, without introducing any third-party web framework. The video's author particularly praised the latter choice—building authentication, queues, and an ORM on the standard library directly answers the skepticism that "Go doesn't need a framework."

The entry point is unified into a single CLI: laravel new lets you choose among PHP, Rust, or Go, or you can add the --go flag directly.

Benchmark comparison screenshot

Axum and Tokio are two cornerstones of Rust's async ecosystem. Tokio is Rust's most mainstream async runtime, providing an event loop, task scheduling, and async I/O—essentially giving Rust a concurrency foundation similar to Go's goroutines. Axum is a web framework maintained by the Tokio team, built on the tower middleware abstraction and the hyper HTTP library, known for type-safe routing and minimal boilerplate. By choosing these two, Laravel Rust stands directly on the most active, best-maintained layer of the Rust web ecosystem rather than reinventing the wheel.

Go's standard library net/http is Go's built-in HTTP server and client implementation. Combined with goroutine (Go's lightweight coroutines, scheduled by the runtime, easily handling hundreds of thousands of concurrent connections on a single machine), it can build production-grade web services. The Go community has long argued that "the standard library is enough, you don't need a framework." Laravel Go, by not adding any third-party web framework and filling in authentication, queues, and an ORM using only the standard library, responds to that skepticism with a real product.

The Real Numbers Behind 18x Throughput

The official claim of "18x throughput" is the most eye-catching figure. But the video's author broke down the test conditions: on a small read-only app, single-core CPU, gradually increasing load until it crashed, Laravel Rust peaked at 1,774 requests/second, while Laravel PHP peaked at 97 requests/second.

However, in the same chart, another Rust framework, Rocket, reached 1,623, and the Go framework Beego reached 1,596—within 10% of Laravel Rust. The video's author concludes that the 18x is more of a general benefit of "switching from PHP to a compiled language" rather than an advantage unique to Laravel Rust.

A more valuable metric comes from CPU usage: under a load both can handle, Laravel Rust used only about 4% CPU, while Laravel PHP used about 52%. In other words, doing the same work requires far fewer servers. As for Laravel Go, the official statement only says it delivers "an order-of-magnitude performance leap over PHP" and "sacrifices a bit of peak speed for much faster compile times" compared to the Rust version; specific numbers haven't been released.

The Real Motivation: Not Speed, but the Review Bottleneck

Taylor made it clear that he didn't build the Rust version because he thinks PHP is slow. His starting point is that the industry no longer hand-writes most of its code, and the real bottleneck has become "whether humans can still read all this code." Agents write code far faster than teams can review it.

His conclusion is that line-by-line human review is no longer sustainable, and the smarter models get, the more this should be accepted. But there's a precondition—if humans no longer read the code, something else must be reading and checking it. The first line of defense is the compiler. Laravel Rust's release documentation states: humans will increasingly neither write nor read application code line by line, and in such a world, strong guardrails, strict compilers, and "out-of-the-box" conventions matter more than ever, along with strong test suites that agents cannot modify or delete.

The second line of defense is the framework itself. Taylor said in a livestream that the choice of language matters less than it used to, but the framework matters more than ever—a good framework is thousands of decisions already made, so neither you nor your agent has to make them again.

Screenshot about Laravel's positioning

The compiler as a guardrail is a particularly typical idea in Rust. Rust's ownership system, borrow checker, and exhaustive pattern matching reject at compile time a large class of errors that in other languages only surface at runtime—data races, dangling references, unhandled enum branches. What Taylor means by "strong guardrails" is exactly this kind of capability: when humans no longer read code line by line, the compiler becomes the first automated correctness check.

A tamper-proof test suite addresses a real problem—when fixing failing tests, AI agents may casually delete or loosen test assertions to "pass." That's why Laravel Rust emphasizes that tests need to be placed where agents cannot modify them, or at least that test changes themselves should become a signal requiring human confirmation. Together with "the framework as convention," this forms two layers of protection: the compiler handles syntax and memory safety, tests handle business behavior, and the framework handles architectural decisions.

Why Rust and Go, Not Java

In a letter to the Laravel community, Taylor raised a sharp question: how many ambitious brand-new projects will choose PHP in the future? On a podcast, he admitted that for years startups kept telling him the same thing—they wanted to use Laravel, but the CTO wouldn't allow it because of PHP's reputation. That reputation may not be fair, but it's real.

His solution is to free Laravel from being tied to a single language: Laravel is essentially a philosophy for building web applications. He wants to bring Laravel to languages with "tailwinds"—not dying languages, but languages where new projects are growing. Rust and Go are exactly such choices.

The video also mentions an amusing episode: the community once spotted a comparison page at java.laravel.cloud and thought Laravel Java was coming; Taylor only replied, "Don't spoil it." But people later discovered that any language combined with laravel.cloud generates the same page—Elixir, COBOL, Perl, all of them—and Laravel Java is not in the plans.

It's worth emphasizing that Laravel PHP will not be abandoned. Taylor has repeatedly made clear that it will continue to be maintained—and not in maintenance mode, but evolving as if Rust and Go never existed.

Two Months, Two Frameworks—How?

This is the most practically valuable part of the video. The first Rust commit was on October 5; by the time of recording there were 2,369 commits, about three-quarters of which were done by the AI agent tool (Amp). Taylor himself made 555 commits, and nearly 90% of the agent commits list him as co-author. He readily admits he learned Rust while building the project.

In the workspace there's a folder called inspiration, containing Laravel PHP source code and documentation plus implementations of other popular Rust frameworks, so the agent can reference the edge cases and tests Laravel PHP accumulated over fifteen years at any time. He read the documentation line by line, spending a full seven days on it, keeping dictation and AI conversations open the whole time and requesting changes on the fly. He also admits, "I didn't review the ORM line by line—that's scary, but also liberating, and it made me much faster."

What replaced manual review was a self-built QA process: he built and tore down over a hundred complete applications with Laravel Rust, covering every part of the framework, often running more than five applications simultaneously while he slept, keeping a friction log and fixing bugs. The video's author considers this approach of "repeatedly building apps with your own framework and then tearing them down" a new QA methodology worth borrowing.

The first Go commit was on November 9, about a month after the first Rust commit, and only 23 days passed from first commit to release, with 1,463 commits total, 86% by the agent. Once Go entered the picture, he developed both frameworks in parallel within a single monorepo workspace, so any fix could "fan out" to all framework versions, because all three maintain the same shape.

Agent development environment screenshot

Monorepo and "fan-out": putting the PHP, Rust, and Go versions in the same workspace means their directory structures, naming conventions, and feature boundaries stay isomorphic. Any bug fix or API adjustment can be copied along the same path into the other two implementations—that's the "fan-out" mentioned in the article. This sacrifices the space for each language version to evolve independently, but gains cross-language consistency—a key source of efficiency for a small team maintaining three codebases at once.

The Amp agent tool is the primary AI coding agent Taylor uses, capable of autonomously reading files, executing commands, and committing code in the repository. The article's note that "nearly 90% of agent commits list him as co-author" shows the workflow is agent-generated and human-reviewed before merging, not fully unattended. Combined with agents.md (a project description file for agents declaring the tech stack, taboos, and documentation entry points), it can to some extent constrain agents from guessing the Go version's API based on PHP habits from their training data.

Does an AI Agent Writing a Framework Count as "Slop"?

The video's author spends considerable time rebutting one view: that a framework written in two months must be "vibe-coded garbage." His argument is that Taylor is a highly qualified engineer who was in the loop the entire time, made architectural decisions, read the documentation, and validated with over a hundred applications. Calling this kind of output slop outright is a lazy insult.

He also acknowledges that slop does exist—what inexperienced people generate with AI can be garbage—but that doesn't justify defaulting to rejection of all AI-assisted engineering output.

As for "why do we still need frameworks—why not just have AI write in the native language?" his analogy is: that's like saying you don't need any libraries or npm packages because agents can write everything from scratch. Unless your reason is supply-chain security—with malicious packages and crates proliferating today, building from scratch does avoid the risk—rebuilding what already exists is just a waste of tokens and money. And what a framework provides is curated conventions and structure, which is more reassuring than raw code an agent improvises.

It's worth noting that agents perform well at writing Laravel Rust because their training data contains plenty of Laravel PHP. But the project's agents.md explicitly warns: don't guess Laravel Go's API from Laravel PHP or other Go frameworks, because agents may slip and write PHP. The file instructs agents to read the current version's actual documentation first.

Screenshot related to agents.md

Next Steps

The next stage Laravel has announced is to push the Rust and Go versions to a stable release, including filling in the AI SDK and the remaining small feature gaps. As for Java, it won't appear in the short term—according to the video's author, Spring Boot is already good enough.

One-line Summary

Laravel rewrote in Rust and Go, and the real motivation is tackling the review bottleneck in the age of AI-written code.

Paragraph Summary

Laravel released Rust and Go versions within two days of each other, both genuine native frameworks rather than PHP ports. Founder Taylor Otwell had AI agents handle about three-quarters of the commits but insisted on deciding every API and naming choice himself. The official 18x throughput claim is broken down as a general benefit of "switching from PHP to a compiled language"—Rocket and Beego are within 10% in the same chart, and the 4% vs 52% CPU usage is the more valuable metric. The real motivation isn't speed but that AI writes code faster than humans can review it, with the compiler, tamper-proof tests, and framework conventions serving as guardrails replacing manual review. The Rust version took about two months, and the Go version went from first commit to release in just 23 days, with quality ensured by monorepo parallel development and a self-testing process of "building and tearing down over a hundred applications." Laravel PHP will not be abandoned.

#Laravel Rust#Laravel Go#Taylor Otwell#AI coding agents#framework conventions#compiler guardrails#PHP framework
Share:

Related articles