Laravel Rust has been released. At Spatie, we’ve ported many of our packages to Rust, and we’ve been moving some of our own applications over too.

The blog you’re reading right now runs on Laravel Rust, hosted on Laravel Cloud. The code is open source on GitHub, so you can take a look at what a Laravel Rust application looks like.

freek.dev running as a Rust app on Laravel Cloud

Bringing our packages along

We’ve believed in Laravel since it was still a small PHP framework. Sharing the packages we built for our own projects was our way of helping it grow. Those PHP packages have now been downloaded 3.5 billion times. I’m proud of that work, and grateful to everyone who’s used or contributed to them.

With Laravel Rust, we wanted people trying the framework to have some familiar tools available. We’ve ported packages such as Media Library, Permission, and Query Builder, alongside framework-agnostic packages such as Browsershot and Image.

We used AI to write the Rust ports. But we gave it PHP implementations, documentation, and tests we’d spent years refining. We already knew how we wanted the packages to work, including where you should be able to plug in your own code.

For this first pass, we mainly reviewed the public APIs and extension points. We’ve spent less time on the code underneath, and we’re not Rust experts yet. These are early releases, not packages with years of production use behind them. I’d try them in a side project first.

I’ve written more about the ports and our approach in this post on the Spatie blog. You’ll find the full selection in our Rust documentation.

Flare accepts Rust errors too

Flare can now accept errors from Rust and Laravel Rust applications, with stack traces and traces to help you work out what went wrong. The Rust client and Laravel integration are in beta.

You can read more in our Flare Rust announcement.

Laravel Cloud has exception tracking now too. Having that built into your hosting sounds convenient. I still like keeping error tracking on a separate service. If your hosting has an incident, it’s useful to be able to read the errors you’ve already sent somewhere else.

In closing

I still think PHP is a beautiful language, and we’ll keep supporting our PHP packages for a very long time. We’re committing to maintaining the Rust packages too.

AI makes moving between languages easier, but understanding the concepts still matters. I’m looking forward to learning more about Rust as we use it. If you give our ports a try, we’d welcome issues and pull requests on the repositories.

Categories: PHP