Live data from Hacker News

Rust needs a web framework

ntietz.com

11–20 of 395 posts

Re: Rust needs a web framework

#13
If you want to make a silly, minimal effort hobby project simply don't use Rust. I'm gonna be honest I don't understand this entire genre of using extremely complex, highly optimized systems languages for tools that don't need them. Your flow chart should basically go like this:

"Do I need zero cost abstractions because I'm writing a computationally expensive very serious project?" If the answer is no use a garbage collected, runtime managed language.

Re: Rust needs a web framework

#14
I wish the author success in their endeavor, but Rust is pretty far down the stack of languages I'd use to deliver a webserver.

I look at Rust for serving web-traffic and I see: dreadful concurrency model (I will never voluntarily go back to async/await after working in Golang), weak client library stories (if I'm writing a service layer for a db, etc.), high barrier to entry, thin overlap with the core Rust value proposition (correctness around memory access, performance).

That's not even addressing the "what happens when my entry-level dev has to write something that interops with a web framework written in Rust." My heart can't take those code reviews, I might as well just write that shit myself without a framework for all the pain that's going to cause.

Note: I don't write a ton of Rust, for reasons that are maybe kind of obvious. I reach for it whenever C seems correct, which is rare but not never (for me).

Re: Rust needs a web framework

#15
post #10

> I like to make silly things, and I also like to put in minimal effort for those silly things. I also like to make things in Rust… I think this part is perhaps the silliest part of a very silly article. If you really like to put in a minimal effort then why on earth would you use Rust? If you want efficiency, memory management and a compiled modern language just use Go. Then you won’t even need anything but the stan…

[deleted]

Re: Rust needs a web framework

#16
post #3

I was surprised not to see Rocket ( https://rocket.rs/ ) mentioned among the frameworks the author listed; I haven’t used it myself because I _like_ the more unopinionated axum/actix-web, but as I understand it its goals are much more in the vein of what the author wants in a batteries-included framework and it’s been around for a while now.

I 100% agree. I'm just a casual multi-language programmer these days, but I'm familiar with Rocket.

Re: Rust needs a web framework

#17

For new web applications, why recommend alternatives to Next.js? How do you convince someone to use an alternative? The knowledge needed to understand why will help you get close enough in Next.js anyway.

Next.js is not nearly flexible enough. I'd never use it. It feels like rails, but somehow even more tightly coupled than that.

Re: Rust needs a web framework

#19
“Slow” scripting languages worked in the 90s for the web and they work even better for now, plus you have more to choose from. The key is to shell out to other tools for heavy lifting, like a database. Multi process architectures are where Linux really shines.

Rust can fit in that picture, but it doesn’t need to be routing http.

Re: Rust needs a web framework

#20
post #18

Rust is not for lazy developers and there are other languages if you want to put minimal effort in building things.

I'm a lazy developer and I love languages with an "if it compiles it works" feel. I'd much rather hack around in rust or typescript with half my brain switched off and a beer in hand and eventually get working software than hack around in javascript with half my brain switched off and a beer in hand and get more and more broken software until I eventually give up.
Post reply on HN