Blog

Building the same app twice: Laravel for Rust and Laravel for Go

12/5/2026

  • Development

Laravel released Laravel for Rust on the 1st of December, and I’d started building something with it before the day was out. The very next day they released Laravel for Go, which felt a bit like being told about the sequel while I was still sat watching the first one. I’ve now got the same app running in both, so it seemed only fair to write up how they got on.

I should say up front that I’ve never actually used Laravel. Almost all of my professional time has been spent in Django, and any deep PHP knowledge I had stagnated around version 5.6. I’ve helped keep a couple of WordPress projects going since, but nowhere near enough to make the jump to Laravel. It only really came onto my radar once I was already deep in Python, and while I’ve spent a fair bit of time reading the docs over the years and enjoying what I’ve seen, I’ve never had the time or inclination to give it the attention it would have deserved.

More recently I’ve been learning Rust and Go, and put together a few projects in each by hand – artisanally, if you like – to make sure I properly understand them rather than just nodding along at whatever an agent writes. So these two releases landed in a bit of a sweet spot for me: Laravel’s way of doing things, in languages I think outperform Python in a lot of ways, written from the start to be used with agents. Getting some of the benefits of Laravel without having to go back to PHP was too good not to try.

So this isn’t a review of how faithful a port either one is – I’m not qualified to judge that. It’s what I found building a real thing in each, coming at it from Django, including the bits that went wrong.

What I built

The app is called Company Watch. You add UK companies to a watchlist, and it tells you when something happens to them – new filings, changes of officers, charges, insolvency, that sort of thing. Behind that there’s a worker that keeps a couple of Companies House streams open all day, a job that checks the Gazette for insolvency notices every night, and an email alert whenever a company you’re watching changes. It all runs as a single binary on one Fly machine.

Why? I wanted something that felt real, and I’ve spent a lot of time over the years in projects that needed company data. I’ve got a lot of experience in the way the Companies House REST and Streaming APIs work, and so I could quickly spec out something that was something like a contract might be.

I mention all of that mainly because it isn’t a to-do app. There’s long-running work, scheduled jobs, outbound mail and a proper deploy, which felt like a much fairer test than the usual demo.

Starting with Rust

Coming from Django, the layout of the app matched what I remembered from reading the Laravel docs – routes, handlers, models, migrations, jobs and Inertia pages, each in their own place. Where it really feels like Rust is in the types. Here’s the handler that stops a watch:

pub async fn destroy(
    Authenticated(user): Authenticated<User>,
    Params(company_number): Params<String>,
) -> laravel::Result<Redirect> {
    watching::stop(&user, &company_number).await?;
    inertia::flash("toast", "Watch stopped.")?;

    Ok(redirect!(watchlist::index))
}

Note that the logged-in user and the company number come in through the function signature, already pulled out of the request and typed. The redirect! at the bottom takes the handler itself rather than a route name, so if I get it wrong the app won’t build. That carries through to the models too – they’re plain structs with a #[model] attribute on top, and the compiler checks column names and value types in your queries. In Django, a typo in a field name only shows up when that query actually runs, or potentially some squiggly lines if you’re aiming to be type ‘safe’, so having the build refuse to finish was the bit that won me over, honestly.

A couple of other things were nicer than I’d expected. Inertia with Svelte worked straight away, and migrations get compiled into the binary, so a deploy is just copying one file across and running it.

The agent side was the other thing I wanted to test. The starter app comes with an AGENTS.md and seven skills that point an agent at the docs for the exact version you’ve installed. That matters a lot for a framework that’s a day old, because no model has seen it before and will happily guess at APIs from PHP Laravel instead. I wrote almost zero of the project by hand, but I read every line and it all seemed to make sense. It works in practice, too, so that feels like a win.

The slow bit

The thing that did hurt was build times. Rust builds were slow locally, and in CI on my OneDev instance they were bad enough that the linker ran out of memory while linking the test binaries and took the whole job down with it. I had to change how the build ran just to get it through.

In all honesty, some of that was me. My Dockerfile didn’t cache dependencies, so every CI run compiled every crate from scratch. Adding a proper cache makes it a lot less painful but even then a cold Rust build takes time, and that was noticeable when I was iterating quickly and had a bunch of CI runs on the go concurrently.

Then Go turned up

Laravel for Go is the same idea built on Go’s standard library. There are no macros – models are plain structs with tags, and errors come back as values that you check with if err != nil rather than passing up the chain with ?.

Because the Svelte pages, the database and the business logic don’t really care what’s running underneath, porting across was mostly a translation job. I pointed another agent session at it and it was done in basically no time. I didn’t measure it, but it was done during the time it took me to have a contract conversation with a lead, which never take that long! The nine Svelte pages came across without any changes at all.

The agent instructions worked just as well, although ultimately this one didn’t start from scratch – it ported the Rust project.

Here’s the same handler in Go:

func Destroy(r *web.Request) *web.Response {
	if err := actions.StopWatch(r, models.CurrentUser(r), r.PathValue("company_number")); err != nil {
		return web.Fail(err)
	}
	inertia.Flash(r, "toast", "Watch stopped.")

	return web.RedirectRoute("watchlist.index")
}

It’s basically the same, except the user and company number get read from the request inside the function rather than arriving in the signature. The redirect takes a route name as a string too, so a typo there won’t get caught until something actually hits that line.

What’s actually different

Build speed is the big one. For cold builds for release I saw ~160s for Rust vs ~30s for Go, with ~12s vs ~2.5s respectively for a rebuild. Dev builds were a bit closer, but Go still won there. For comparison, a third-party write-up from qadrlabs measured 4 minutes 45 seconds for a cold Rust build against 29 seconds for Go, on one 8-core machine. Laravel’s own Go page says builds “finish in milliseconds”, which I’ve yet to see unless we’re measuring in thousands of milliseconds.

The flip side is when you find out you’ve made a mistake. In Rust, a wrong column name stops the build. In Go, the framework checks column names when it builds the query, so you find out when the code runs – hopefully in a test rather than in front of a user. That puts a lot more weight on having decent test coverage, which we should all be aiming at anyway but becomes necessary on the Go side.

On memory, the same qadrlabs test had Go idling at about 25MB against 38MB for Rust. I saw 15MB on Rust and 20MB on Go, peaking at 71MB and 59MB respectively with 128 connections.

On raw speed, Laravel says Rust is 18 times faster than Laravel PHP in their own tests, while the Go announcement calls it “an order-of-magnitude jump” without giving a number. While I didn’t compare to PHP, I can say that throughput on pages that fetch from the DB were within around 10% of each other in Rust and Go. The difference is in pages that didn’t fetch from the DB, with Go being around 5x faster for me on my welcome page. That page still writes to the DB, with a session row, so I assume the difference is in the framework itself but I haven’t found it.

The thing I missed most

Coming from Django, the biggest gap wasn’t really in either framework – it was the admin. In Django you register a model and you get a working set of screens to list, search, add and edit records, without writing any front end at all. On projects like mine that’s a massive part of how I prototype: I can get the models right and poke at real data long before I’ve built a single page. On bigger projects it’s the built-in way for product and marketing teams to look after some of the data themselves, without needing a developer every time.

Neither Laravel for Rust nor Laravel for Go has anything like that yet. In the PHP world it’s handled by packages rather than the framework itself – Filament is the free one most people seem to use, and Nova is the paid one from the Laravel team. Even those aren’t quite the Django experience, as from what I can tell you generate a resource for each model and then shape it, rather than registering a model and being done.

For the new languages, the closest thing I’ve found is an unofficial Filament port for Laravel Rust that appeared on the 3rd of December, which at the time of writing is a README with a single code sample. The Rust docs do mention “a full admin panel” as the sort of thing a package could add, so the door’s open. I’m quite tempted to have a bit of a go myself…

For Company Watch I could do without. There’s nothing to manage manually really, so if I needed to make any amendment I’d roll up my SQL sleeves and get it done. That’s fine for a side project, but it’s the first thing I’d want sorted before suggesting either one for a project where non-developers need to touch the data.

Why not just learn PHP Laravel?

That’s the obvious question. PHP Laravel has had over a decade in production, there’s a package for nearly everything, and almost any question you have has already been answered somewhere. The Rust and Go versions were days old when I started, and the Go docs say plainly that things can break before 1.0.

For me, though, it would mean relearning a language I left a long time ago, when the whole point was to use the two I’ve been putting the effort into. If you already know PHP Laravel, I’d guess the mature version is still the sensible choice for client work – but that’s a guess, not something I’ve tested.

Which would I pick

Honestly, the one in the language you’re most comfortable with. They share the same Laravel shape, so the language is the thing you’ll actually be living with day to day.

If you’re happy in Rust and want the compiler catching as much as possible, it’s great, as long as you can put up with or work around the builds. If you’d rather have most of the same benefits and builds that don’t leave you time to make a cup of tea, Go makes a lot of sense. Either one earns its place most in apps with long-running work, or where running costs actually matter. And if you already know PHP Laravel and want the mature ecosystem, I can’t see a reason to move yet.

For Company Watch I’m sticking with Rust, because I have no reason to smash out a ton of iterative builds of it each day that would get held back by CI.

I’ll be keeping an eye on whether the Rust builds get any quicker, how much the APIs move about before 1.0, and whether any community packages start turning up – an admin panel most of all. If anything interesting happens I’ll write it up. In the meantime, I hope that’s useful for anyone wondering whether to try one of them.