It’s official, Laravel Rust is here and has been announced by Taylor Otwell, creator of Laravel.
This is not much of a surprise for anyone who has been watching social media posts of late, but what does it mean for PHP developers? Are we all moving over to Rust? Here are some quick first thoughts, I’ve no idea how accurate or reflective they are, but I promised myself to blog more.
Firstly the Good
- PHP Laravel is not going away - there is still full commitment to the PHP framework.
- It will be available on Laravel Cloud which makes everything easy for a developer and it will co-exist nicely with PHP apps.
- I have not heard of any Rust web frameworks (I haven’t exactly looked either). If the same great developer experience happens with Laravel Rust then I’m sure it will be the market leader in a short space of time. Rust is still on the rise and the Laravel team are very much skating to where the puck is going with this move.
Things that I’m not so keen on
The Focus on Speed in Benchmarks
Laravel has posted benchmarks of the Laravel Rust. It will not surprise you to know it’s 18x faster. But let’s dig into this a bit more.
Firstly the app is barely more than a Hello World app there’s no significant business logic in there - I still expect it will be 10X faster or better in real world apps (when they are built!). Is that useful for most apps/developers though?
- Most apps run on a single instance and if it’s costing $20 or less per month you’re not going to save much.
- If your app is substantial, CPU isn’t possibly going to be the bottleneck. At scale you have to deal with slow queries, asset caching, queues etc. It will benefit apps that require low latency and are CPU heavy for sure - Anthropic recently rewrote their messages API in Rust.
App speed is rarely an issue these days - the bottleneck is increasingly becoming human comprehension of AI feedback.
Comprehension
I have no doubt that Taylor has done a great job on making the code developer friendly as he rebuilt the framework, kudos to him for accomplishing this - human insight is still required despite what AI can do. You can’t just take this on lightly. However, if I was to start using Laravel Rust it and hit a bottleneck with migrating an app to it, I wouldn’t even know what to ask AI to do. I’d be flying blind.
If I moved to using Rust I’d have to go all in and properly learn it, I just can’t see myself doing anything outside of CRUD app without hitting some serious head-scratching moments.
Package Support
There are thousands of packages for Laravel (…PHP, got to keep remembering that now!), and if we only count the popular and well supported ones, that number is very much in the high hundreds.
I see Spatie has announced that some of their packages have been remade for Laravel Rust - this is great, but a lot of packages might have a single maintainer, possibly with no Rust experience (yet). If they also make a Rust version that’s another code base, another set of pull requests, and another set of GitHub Issues (the ones you add to GitHub, not issues with GitHub itself… but let’s not dwell on their uptime of late).
Perhaps developers are freeing up enough of their time lately that taking on another language to a good standard is possible now?
Overall Feeling
It’s good. Very good. Gut reaction from the community seems to be that Laravel is going the direction a lot of the devs were (or are) going in anyway. PHP is not going away, but Rust is very much here to stay.
You can find out the full details of Laravel Rust on the official website. __________________
Headline/social image: https://www.pexels.com/photo/close-up-of-rusty-metal-texture-details-41008828/