4 ms·
Rust already has several server frameworks that are relatively low-level network plumbing, and leave figuring out everything else to the user. If that's what y
by pornel 2y ago
Rust already has several server frameworks that are relatively low-level network plumbing, and leave figuring out everything else to the user.
If that's what you like, you can pick and choose from all the existing tools.
The Rust's ecosystem is now missing its Rails or Django.
This is an attempt to make something for those "lazy" devs who don't want to write their own cookie parsing middleware, and figure out how to get a database connection pool working with a request router.
- echelon 2y ago> Rust already has several server frameworks The incredible proliferation of Rust web frameworks should be an almost blinding beacon advertising how well-suited Rust is for web backend development. The biggest takeaway that anyone new to Rust or new to Rust-on-backend should have: Rust absolutely rocks for backend development. It's getting a tremendous amount of attention, people are trying a lot of things, and it's crystalizing as a major backend powerhouse. You can be just as performant in Rust as you can in Go, or frankly, Python, and the result is super typesafe, super ergonomic, and blindingly fast. Google recently published a paper that said as much. Rust already has several Python Flask equivalents (Actix/Axum), and it's waiting on its Rails/Django framework. For anyone scared of Rust or the borrow checker: due to the nature of HTTP services and request flow logic, you almost never bump into it when writing backend Rust. But if you ever need to write anything with multiple hand-rolled threads or worker pools, you can. Rust opens up a lot of interesting possibilities, such as rich in-memory databases. But you certainly don't have to use these powers either if you don't need them.
- dlisboa 2y ago> For anyone scared of Rust or the borrow checker: due to the nature of HTTP services and request flow logic, you almost never bump into it when writing backend Rust. I’d say for anyone worrying about it just use ‘clone()’ everywhere you can. If you’re coming from any interpreted language the performance and efficiency will just be so much better that it doesn’t matter.
- echelon 2y agoThat's an excellent way to get your footing. And you can come back in a month and fix it all easily.
- johnisgood 2y agoclone(); )?; all that stuff is just meh.
- johnisgood 2y agoI mean, who thinks using .clone() everywhere is such a good idea?
- echelon 2y agoIt's a suggestion for beginners writing their first Rust program. You wouldn't do this once you feel comfortable with the language.
- johnisgood 2y agoThey might end up with a bad habit, however.
- dlisboa 2y agoThere’s https://loco.rs/ https://loco.rs/ if you like that sort of Rails experience. Personally I’ve grown more fond of having little cruft in my apps, being “lazy” about what goes into the code isn’t right to me and many of these frameworks don’t really care about that. To me most of the value in these opinionated frameworks is in the scaffolding anyway, not the opinions.