A genuine question, why would someone choose Rust for web development instead of Typescript/nodejs? Most of the times the database is the bottleneck for web applications and nodejs will provide good enough performance for that. Also, typescript provides a good type system like Rust without the tedious need to manage memory with borrow checker.
Full time Rust dev here (For only about ~10m, before that hobby Rust dev). Used to be a full time ts dev.
Others mention the smoothness of Serde. I also really enjoy using sqlx, and the wider tooling and crate documentation makes it a pleasure.
I do really miss the compilation speeds of ts, and even with a lot of fiddling it’s hard to get close to but the borrow checker and dev speed has almost caught up at this point if it wasn’t for the compile times. CI/CD still 5-8 minutes for us even with a lot of caching etc.
Lack of enterprise resources is also a little tough though I find C# and F# resources good analogues.
Perhaps my favourite little benefit which I really regret being without on ts services is the ability to clone a repo and then use your own copy as the crate. Allows a lot of debugging power, and allows you to run with your own patches while they’re still getting accepted into the crate. Honestly my favourite feature of crates.
Would I use Rust if I had to start a business from scratch? Maybe. I joke with a friend I’d probably prototype microservices in TS then migrate the high traffic ones to Rust. The memory footprint is great but rarely a business requirement. The volume it can handle might be?
Probably because they find it fun? That's almost always the case when something seems "impractical".
I kind of feel like there's a disconnect here between people who write software solely for work & to solve an engineering problem vs people who like it as a hobby.
I have very little interest in using Rust for webdev, but I'm excited to see what people having fun with it will come up with.
It’s a combination of learning new languages and concepts, expanding my skill set and so on. I have written typescript professionally for a number of years now, and its type system doesn’t even come close to Rust.
I use Go professionally and would most likely choose that if I had to do any new “serious” web dev project. But the Rust eco system has come a long way. Plus, the borrow checker aren’t really that tedious once you get use to it. At that point you get a lot of benefits!
Been using it for a personal project [0] and, having built things with JavaScript in the past, I can honestly say my development speed is far far faster with Rust. All the weird things that JS permits and all the weird runtime errors become compile time errors. To be fair, I haven't tried typescript.