Live data from Hacker News

Rust needs a web framework

ntietz.com

31–40 of 395 posts

Re: Rust needs a web framework

#32

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.

1. Lots of dead ends. Fetch cache limit for example. Cant replicate prod page caching behaviour in dev. Etc. Many issues with 100 thumbs get abandoned.

2. NodeJS. Not everyone likes it.

3. It is slow. Yes it is! Try to get good web metrics with Next I dare you!

4. Premature release of App Router. Will they do something like that again.

Re: Rust needs a web framework

#33
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…

What kind of logic is this... The Rust language is quite rigorous, so web frameworks on it should also be equally laborious to work with? You have to roll your own authentication, you have to do your own routing, you have to do ad-hoc string manipulation instead of templates?...

The person likes writing in Rust, and would like to have a batteries-included web framework so they can tie together a web app quickly on the language they like to use... And I know they did not include https://rocket.rs/ in their 'existing ecosystem' section.

Re: Rust needs a web framework

#35
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…

As a Linux user I’ve had to deal with these kind of people who wouldn’t use something new unless it was made the same of what they’re currently using, all my life, they just are not able to get it

Re: Rust needs a web framework

#36
Rust has some great and useful web frameworks that are a joy to use, once you understand what is going on. For example, in Axum, they use traits cleverly to allow you to use dependency injection the same way that fastapi uses it. But at least when I started using it, that wasn’t an insight made bluntly clear with tutorials as good as tiangolo’s. Instead, I had to piece it together via examples in the axum repo as well as from watching a youtube video.

Don’t fear, Rust can be as simple and clever as any other language. And the Rust core OSS developer community has spent at least the last ten minor versions improving dev ex considerably.

Re: Rust needs a web framework

#37

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 c…

I don’t know about that. I already knew a little Rust last month when I wanted to write a REST API server that would benefit from being deployable as a single executable. I probably spent a grand total of 2-3 hours researching which framework to use (actix-web for me), reading the code, and implementing the endpoints I needed. The end result ended up looking an awful lot like a Python Flask app. The actual code writing part of the project wasn’t any more complicated than using any other language might’ve been.

Learning Rust and learning web service programming at the same time would have a steep curve. If you already know the basics of Rust and have written web services before, writing a new one in Rust needn’t be stressful.

Re: Rust needs a web framework

#39
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…

What kind of logic is this... The Rust language is quite rigorous, so web frameworks on it should also be equally laborious to work with? You have to roll your own authentication, you have to do your own routing, you have to do ad-hoc string manipulation instead of templates?... The person likes writing in Rust, and would like to have a batteries-included web framework so they can tie together a web app quickly on th…

If you find the language rigorous, a web framework can't magically do away with that. It's genuinely illogical to believe so. There are plenty of web frameworks on Rust that are quite nice to use, but they are still Rust, with all its shortcomings in the same way Django is still Python with all its shortcomings.

What you're asking for is a DSL built on top of Rust for the purpose of creating web apps.

Re: Rust needs a web framework

#40

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.

1. Lots of dead ends. Fetch cache limit for example. Cant replicate prod page caching behaviour in dev. Etc. Many issues with 100 thumbs get abandoned. 2. NodeJS. Not everyone likes it. 3. It is slow. Yes it is! Try to get good web metrics with Next I dare you! 4. Premature release of App Router. Will they do something like that again.

I appreciate that you’re getting to the crux of the matter instead of downvoting.

In our experience elevating the web metrics in Next.js takes the same expertise as doing it in any other framework. Our experience with Vertx and Microsoft’s dotnet web frameworks have been good, but Next.js got us to a fast, featureful, performant website sooner and with more flexibility around requirements. I won’t pass judgement on rust frameworks I haven’t used, but it’s just to say that in an honest accounting, a naked backend framework is less than half the product when you’re talking about web applications actually worth making with original ideas. Unless you work at Google.

Post reply on HN