DEV Community

Cover image for Laravel inside Rust? I have a reason for that.

Laravel inside Rust? I have a reason for that.

Daniel Reis on February 26, 2024

What's up everyone! I've been study Rust for the last couple of months and always trying to get closer of my actual stack which is around Laravel ...
Collapse
 
leandronsp profile image
Leandro Proença

nice write-up! I miss a “one-person” framework in Rust too, I think such a project could make Rust more intuitive in the web scenario.

have you seen loco.rs? it’s around this idea, heavily focused in the Rails way (which I think Laravel share some similarities)

Collapse
 
thalesmengue profile image
thalesmengue

What you have done is amazing, I always thought that laravel way to structure their modules is pretty organized and well structured, so, why not do this in another language if is well structured, right!?

Great job, looking forward to see the next steps of the project!

Collapse
 
reenatoteixeira profile image
Renato Teixeira • Edited

really interesting! thanks for sharing!
I'm starting to learn somethings about Laravel and it's curious to know that we can "copy" some structures... since I'm starting I don't know if Rust has its own structure but I think that if that's helping and working, there's no problem at all

Collapse
 
danielhe4rt profile image
Daniel Reis

AFAIK, Rust developers doesn't like to opinionated in other developers Structures.

However, there's plenty of Rust projects that you will look at the README and see something like "this is an opinionated structure using the framework X and Y tooling".

I'm not a fan of copying things without know how it works behind the curtains, and that's why I'm following the Laravel structure.

Collapse
 
anthonyvii profile image
Anthony Vinicius

Amazing post as always @danielhe4rt. Thanks for sharing your knowledge with us.

Collapse
 
holifk profile image
Priscila Cabral

Great article, Dan!

What challenges did you face as a PHP developer transitioning to Rust, and how does incorporating Laravel into Rust development help address these challenges?

Collapse
 
danielhe4rt profile image
Daniel Reis

First actual challenge was migrating to a heavy typed language. Rust doesn't allow you to do lazy typing like PHP.

Also the immutability is a thing here. In PHP you can do whatever you want with the variables, in Rust, it must follow some patterns if you want to mutate it.

The Laravel come when I need a more specific way to bring Web/Console/Database opinionated development, since I know each part of the framework not only in the "end user" side, but some internals as well.

Collapse
 
kecbm profile image
Klecianny Melo

Excellent article @danielhe4rt ! Discovering new possibilities in technology is the action that opens up opportunities and universes for us as developers. Comparing what we are studying with what we already know is a good way to deeply understand the difference between the tools 😁

Collapse
 
cherryramatis profile image
Cherry Ramatis

nothing like a good old laravel architecture in every possible programming language