r/rust • • 18h ago

🎙️ discussion Laravel Rust

I’m primarily a PHP engineer, but wondering how the Rust Community feel about the announcement of Laravel Rust (https://laravel.com/rust)?

127 Upvotes

63 comments sorted by

26

u/Puspendra007 18h ago

Anyone used it? Performance? Speed? Any review?

Rust having a great structure already so what's special in this laravel rust?

11

u/Zde-G 17h ago

Hype? I'm not really sure what it may bring, except for the well-known name… but well-known name may just be enough to convince some people to adopt it — and it doesn't look worse than most alternatives, thus it may have a chance.

P.S. Before someone would try to explain to me that it's “batteries included”, “no need to investigate 10 crates” and so on… all these don't matter: PHP developers wouldn't suddenly switch to Rust and Rust developers don't benefit from tools known in the entirely different ecosystem. That means that adoption have to come via agentic coding… and agents don't care whether features you need come from one web site or from 10 or 20 of them.

3

u/Puspendra007 17h ago

Ahh, maybe this can be reason that people are leaving php & going towards rust so they'll get a familiar setup with rust.

As per my limited knowledge: PHP is not a very good and performance oriented language. It's easy to setup & fast development (except core PHP) with laravel. PHP is used by many full stack developers , rhte make websites for clients and laravel have all setup for it so it's good for those developers.

Rust is a different product. It's made for performance and speed with slow development.

Adding many features and things of laravel will make it slow & why to add unnecessary features in a project? It's already easy to setup things and features in Rust so why to use that much of setup.

Laravel setup are good but it's going to harm speed & performance & security of rust.

It's like , we're using whole big truck to just delivery a Large size Pizza

-1

u/Zde-G 16h ago

It's like , we're using whole big truck to just delivery a Large size Pizza

Similar, but different.

PHP is not a very good and performance oriented language.

It's actually good at what it does, but you have to understand exactly what it does.

The idea behind PHP is that it's language for non-professional programmers and requires very little from developer to use it. Later versions are becoming steadily worse, but that's the core promise.

It's easy to setup & fast development (except core PHP) with laravel

Yes, the core promise of laravel: raw PHP is, well… “too raw“, so here's the framework that adds some niceties to PHP — and you may learn that framework with nice videos on YouTube, then it's finally over, you can code your web site without learning anything else.

Rust is a different product. It's made for performance and speed with slow development.

Development in Rust is not slow. It's faster that many other languages. What's slow is “bringup”. It's pretty complex and hard to grok language. It takes time to learn it. And it's expanded all the time, even blog post that proclaimed release 1.0 is talking about stability without stagnation

Now compare that with PHP and laravel promise… almost the total opposite. Instead of “here is something you may need to learn, quickly and never learn anything else ever again” there are an ecosystem that is stable, yet evolves all the time.

Who would want a combination of these two opposites? Well… PHB might. Someone who doesn't care about substance, only about buzzwords. And that maybe enough, we will see — LLMs are flexible, if you would ask them to write your website using Brainfuck… they would would use Brainfuck. Laravel in Rust is definitely not worse than Brainfuck, so why no?

-2

u/Substantial_Snow3932 16h ago

I watched the release stream, and the Laravel creator signed it off with "use your agent to build something amazing"... seems its designed for agentic development. Agents tend to do better with compiled and typed languages, so I don't think development would actually be slower than in PHP.

I figure golang would have been a saner choice due to the broader ecosystem, should performance be the main selling point.

TBH PHP performance is reasonable for the majority of web apps. It's not a slow language (considering its domain). Web apps mostly wait on network and db. However, in-request concurrency isn't easily available.

4

u/HumanDotGg 15h ago

The Golang ecosystem is really not fan of frameworks, ORM, ... It couldn't match with the ecosystem

3

u/synn89 14h ago

This is a good point. Go devs are very into just using core Go.

0

u/Zde-G 15h ago

I watched the release stream, and the Laravel creator signed it off with "use your agent to build something amazing"... seems its designed for agentic development. Agents tend to do better with compiled and typed languages, so I don't think development would actually be slower than in PHP.

Probably not, but agents are also great at integrating third-party dependencies and don't have desire to obtain everything from one source to ensure there would be one tutorial, which means having premade mish-mash of crates that someone decided would be good for them is not a big win.

I figure golang would have been a saner choice due to the broader ecosystem, should performance be the main selling point.

Their selling point is two buzzwords, more or less.

And Rust is louder buzzword than Go.

As I have already said it's not a big deal: using laravel instead of directly using axum wouldn't help agent to create something faster, but it wouldn't slow it down either thus people who would pick that mix would be perfectly happy with the result even if the only thing that they would get from this arrangement is an extra buzzword.

0

u/FreesiaPhantom 12h ago

not sure but you sound like you'd figure it out quick

15

u/[deleted] 17h ago

[removed] — view removed comment

0

u/Zde-G 15h ago

True, but how much of that would be relevant to somrthing in a different language with a different code structure and different design patterns?

The only thing that one may transfer in this transition is well-known name.

It's Nokia 3210 (2024)…

-2

u/darko777 14h ago edited 13h ago

It all comes down to the community size. Laravel is quite popular, has large community and generally enjoyable ecosystem but many people avoided it because of the PHP and shifted towards more enterprise tech like Spring Boot or the alternatives.

2

u/Zde-G 13h ago

It all comes down to the community size.

Yes. Which is zero-sized if you talk about “Lavarel in Rust”!

Laravel is quite popular, has large community and generally enjoyable ecosystem but many people avoided it because of the PHP and shifted towards more enterprise tech like Spring Boot or the alternatives.

Yes… and how label attached to something totally unrelated to original Laravel help anyone?

That's the issue: you can apply your expertise in original Laravel to this new thing… the suggestion is “to use agents”, but agents don't need it, instead of premade mish-mash of various technologies that are combined to become “Laravel in Rust” agents can easily combine all these components (and others, as you instruct them).

1

u/darko777 5h ago

Yes agents doesn’t need Laravel but Laravel is set of rules and tools that shape your workflow. Agents may not need them but surely they will be better with them. That’s the point.

1

u/Zde-G 1h ago

Agents may not need them but surely they will be better with them.

For a short time — maybe. While decisions made in laravel mish-mash would stay "state of the art".

Story of Python and Go have shown us it doesn't last long and I suspect in an era of agents it would lost its "state of the art" status even faster.

Yes agents doesn’t need Laravel but Laravel is set of rules and tools that shape your workflow.

That's only true for humans, because humans take a long time (often years!) to learn something, but once you have learned said something you tend to apply it again and again. Thus the right collection of tools matter.

Agents couldn't learn anything deeply, not really (or maybe “not yet?”) but they can easily adopt any tool you would give them.

Creating set of rules in .md file for them is much better than turning this set into stone by creating a “canonical mish-mash” of crates.

41

u/nicoburns 15h ago

Well damn. I think we can officially declare ourselves to be "web yet".

For those unaware, Laravel is one a very select few frameworks that competes with Ruby on Rails. Most language ecosystems do not have an equivalent.

A version for Rust is big deal.

3

u/NeyaVexy 11h ago

yeah this might actually get me to finally try rust for real

10

u/mikidimaikki 18h ago

Damn! I think Topcoat is aiming for something similar as Laravel when it comes to productivity. Almost feels like April fools to see Laravel rewritten in Rust all the sudden, but I would expect there to be a long tail of bugs to be tackled. The first commit is less than two months ago btw: https://github.com/laravel/rust

2

u/Marthaelx 9h ago

I believe Topcoat would be a better choice

10

u/protocod 17h ago

I've learned programming by doing some Laravel websites a long time ago. Docker didn't exist, REST API wasn't a thing.

I've wonderful memories with Laravel. Great development experience. I tried other framework back then, Django, Ruby On Rails but my favorite stays Laravel.

Many years later, during my computer science degree I started to enjoy system programming more and now I'm doing rust professionally since 2021.

Axum is a great piece of software but it's like a low level library for making async Http server where something like Laravel is a battery included framework designed for productivity by using convention over configuration principle, scaffolding, ORM etc.

However programming and web development is so much different nowadays. I don't know if I would enjoy to do website like I did many years ago.

12

u/--San-- 17h ago

axum is more like the router. HTTP server would be hyper.

This Laravel stuff uses axum btw, it actually just seems like a bunch of existing crates munched together.

17

u/real_serviceloom 18h ago

Looks pretty good ngl

20

u/Far-Habit-2713 18h ago edited 16h ago

Wow. This is actually nice!
Like exactly what o actually need to bootstrap new service. Skills included. Authentication and authorization. When it comes to frontedy i usually do simple backed generation with htmx for dynamic but im open for something new that will actually speed up development.

5

u/jorshhh 15h ago

Inertiajs integration with Laravel is probably the best FE integration that I have ever used

3

u/darko777 13h ago

It is so neat that it’s even neater than Laravel itself

7

u/wartab 16h ago

Checked a bit of the documentation and this does seem pretty cool. It's building on top of Axum, Tokio, Serde etc.

6

u/lambdacomplex_ 17h ago

Is this completely new web framework for Rust, isn't it? If it has no connection to PHP, I will give it a try.

10

u/_nathata 17h ago

I don't hate it

3

u/jpmateo022 14h ago

It has a good architecture probably may bring more developers to learn Rust.

But I did not expect the Laravel team will be the one making the rust version because I thought they only focus on JS and PHP

2

u/tastychaii 16h ago

Thanks OP for sharing

2

u/DryanaGhuba 16h ago

It's interesting, but as usual I stopped being happy about rust projects as they usually low effort llm driven

1

u/Sea_Mud6698 13h ago

It was made in two months so yeah

1

u/Alternative-Tie-4970 16h ago

I am completely out of the loop of this one. What is it trying to do?

6

u/nicoburns 15h ago

It's a Ruby on Rails competitor: a "batteries included" web framework.

1

u/Rubfer 1h ago

while there may be some bloat, i really like "batteries included" web frameworks, it standardises things so all projects will follow the same structures, its good for both humans and llms

3

u/Zde-G 16h ago

Attract PHBs by combining two “hot” buzzwords.

It may even work, I don't see why not. It's completely useless and pointless thing… but that doesn't mean it wouldn't work.

6

u/superjared 14h ago

I don't think it's either useless or pointless. There's value in having a heavy-hitter like Laravel support a well-documented and opinionated framework. Maybe not for most people here (l33t hax0rs), but definitely for the industry as a whole.

-2

u/Zde-G 13h ago

There's value in having a heavy-hitter like Laravel support a well-documented and opinionated framework.

What exactly is that value, pray tell?

Maybe not for most people here (l33t hax0rs), but definitely for the industry as a whole.

Maybe if you include sale of 0-day vulnerabilities.

Yes, “well-documented and opinionated framework” grown naturally may be useful: it creates certain community around it, people learn its quirks, gradually, it becomes its own thing.

But that's not what we have here, it's Nokia 3210 (2024): something that is totally unrelated to that framework, a mishmash of technologies that are separate and existed before it, under familiar name, for marketing purposes.

No one knows it, except for LLMs — and LLMs can just as easily use components without needed this premade mish-mash.

Worse: LLMs tend to prevent creation of communities that, in the past, “opionated frameworks” have grown around themselves.

Means such framework is useless for LLM users and useless for non-LLM, old school, developer, too… who is left? PHBs? Well… this would probably work, as I have said: if you ask LLM to use what's included in Laravel then it wouldn't hurt too much (especially in the beginning when components used are still one of the best available), but over time it's value would be, most likely, negative.

4

u/superjared 13h ago

The value is the company behind it. Laravel is known and respected, which you may not care about, but lots of people and companies do. For them to create a 1st party framework for Rust is to tell all of their current customers they now have a “secure” and “fast” option.

As far as LLM integration, you’re right but only for so long. If you’re diligent, you can point your agent at the documentation and have sub-agents do the token-heavy work, etc. But the larger point is that this won’t be true in 2 years. In 2 years, Laravel Rust will likely have a relatively strong ecosystem and will largely be baked into models by that point.

1

u/Zde-G 1h ago

Laravel is known and respected, which you may not care about, but lots of people and companies do.

Isn't that what I wrote?

In 2 years, Laravel Rust will likely have a relatively strong ecosystem and will largely be baked into models by that point.

In 2 years Laravel Rust will likely be starting to show its age and people would talk about hacks needed to replace parts of it.

Fundamental ideas are already there, in models and you don't need to bake syntax in your models to use the new library or crate — that's how agents may use Laravel Rust now — but by tying components together you are making it harder to replace some or all of them.

That's why Rust haven't produced gigantic, all-encompassing, crates like Qt or, indeed, Laravel… till now, I guess.

1

u/kyle787 14h ago

This is kinda crazy actually. I remember using Laravel years ago when it just came out, made Yii and symfony feel like working with sticks and stones lol

1

u/dhbradshaw 12h ago

Love it

1

u/dumindunuwan 10h ago

Taylor Otwell write Rust now 😍

1

u/FiammaOfTheRight 8h ago

Benchmarks are strange. Also, my lazy ass internal framework that i did because i needed to handle client disconnects somehow outpreforms this on same bench even though i have no idea how to write proper server.

AppBest 10-second throughputPeak app CPUPeak app RAM
Cancels5,696.7 RPS74.2%71.4 MiB
Laravel Rust4,231.5 RPS98.7%190.6 MiB

Compile times are going to cook vibecoding on Rust vs LaraPHP, slowing down the verification loop. Code being in Rust going to cook a lot of devs who cant read it, leading to further "dont read ship". Abstraction over using sqlx for DB is going to unsolve main bottleneck - db operations

Not sure whats the point, considering that most of stuff was advertised as "easy to use with llms". Well, just tell llm go get you hyper + sqlx and roll with it, it'll be faster.

1

u/deanrihpee 7h ago

ah Laravel, my previous jobs are maintaining and updating legacy servers using Laravel, now we have rust version? might try for a bunch of test projects that has been dead and have been migrated to other framework for a long time

1

u/Anbaraen 6h ago

Has anyone reviewed the code yet? I want to know if it's actually good, idiomatic Rust or if it's a vibecoded mess.

1

u/DavidXkL 1h ago

I would definitely prefer topcoat or Leptos over this for now 😂

1

u/Sad_Journalist3328 15h ago

I think best thing in Rust and development is https://github.com/cornucopia-rs/cornucopia

I have done both ORM-s and SQL and: SQL is query language that is build for queries, ORM looses percision and abstracts away that can, and I would claim, needs to be clear and direct.

It is awesome that there is optionated full "do it like that" set of rules, i believe LLMs will be benefiting also.

0

u/fat_coder_420 17h ago

We already have axum.

I dont think its meant for rust developers. Everyone is re-writing in rust since its so easier with AI agents. So i think its primarily for php developers wanting to migrate their apps to php but have a familiar php/laravel architecture.

8

u/sondr3_ 15h ago

That’s the argument people on HN had when Dropbox was announced too, we have rsync already. Having a cohesive full stack framework is something I’ve been missing in Rust, some times it’s nice to be able to pick and choose all the nits and knots and other times you just want to spin up something without having to think about what libraries are updated, integrated, still maintained, works well and so on. I think this will be great, I’ll have to play around with it.

6

u/frakkintoaster 16h ago

This is built on top of Axum

0

u/source-drifter 16h ago

i though we have laravel at home

https://loco.rs/

0

u/dumindunuwan 11h ago edited 8h ago

10x speed and 8x less memory over Laravel PHP

https://laravel.com/rust/docs/structure layered folder structure instead modular, not the best way to write in Rust. However with tokio, serde, serde_json; A wrapper. Definitely this will outperform Laravel PHP implementations but not Axum, Ntex or Actix.

Also https://github.com/laravel/rust no /crates folder or similar layout. Feels this is just 1:1 Laravel PHP -> Laravel Rust rewrite which will make it easier to adapt Laravel PHP devs to Laravel Rust with 10x speed and 8x less memory consumption.

However, don't write PHP in Rust Syntax!
Same with PHP in Go Syntax! Ex. https://www.goravel.dev

-1

u/TTachyon 17h ago

Where did they announce it? This is the first I heard of it.

Until some good reasons are presented why should anyone use this, I don't have an opinion. But also when I hear framework/batteries-included, I get a bad feeling. These kind of words have a bad reputation for me.

3

u/DracTea 17h ago

on there youtube channel and website https://laravel.com/rust

2

u/TTachyon 15h ago

I skimmed through that link before posting and they never explain the why anyone should use this. Just how. Why is it better than what already exists?

Text is the superior format for this kind of information, I won't be searching it on yt.