Live data from Hacker News

Rocket v0.5: Stable, Async

rocket.rs

11–20 of 59 posts

Re: Rocket v0.5: Stable, Async

#11

What the advantage over axium(please correct me)

I'd say it's more of an opinionated approach to a web framework, which reduces boilerplate on a lot of simpler applications. In order to facilitate this, it ends up creating more of a Domain Specific Language (DSL) using macros and types for Rocket, which can be harder to manipulate in ways you might expect as a Rust developer.

Axum on the other hand tends to avoid macros and uses the type system in "more composable" way with other Rust crates, and while still providing a concise way to create web apps, has resulted in more boilerplate to hit the ground running in my experience.

Re: Rocket v0.5: Stable, Async

#12
post #7

I was developing a fairly large web app with Rocket 0.4 (released 2018!) and it started as a good experience, but then I was burned by the lack of support for multipart forms (i.e. file uploads), poor async, no option to listen on unix socket (required by my hosting provider's proxy) and long compilation times (not fully fault of Rocket, Rust compiler team has done a lot to speed up compilation since then). In the en…

> I learned that perhaps Rust is not the right choice to make full-stack web apps and rewrote everything to Laravel (PHP) and Vue (JS).

I fully agree with you on this one and people have been saying this for a long time now, Rust and its kind has its place. Full stack web framework is not one of them.

Re: Rocket v0.5: Stable, Async

#14
I like the idea of Rust, its technical merits etc, but good lord this language has some crazy weird and intimidating syntax. I read the code snippets and am just confused as heck.

Did it really have to look like this?

Re: Rocket v0.5: Stable, Async

#15
post #7

I was developing a fairly large web app with Rocket 0.4 (released 2018!) and it started as a good experience, but then I was burned by the lack of support for multipart forms (i.e. file uploads), poor async, no option to listen on unix socket (required by my hosting provider's proxy) and long compilation times (not fully fault of Rocket, Rust compiler team has done a lot to speed up compilation since then). In the en…

I think my biggest annoyance with Rocket is that testing seems like an afterthought. I don't think the documentation even mentions testing forms.

I also need to hack around a bit to ship templates, since I want to distribute my app (with a Rocket server in it) as a single executable.

Re: Rocket v0.5: Stable, Async

#16
post #7

I was developing a fairly large web app with Rocket 0.4 (released 2018!) and it started as a good experience, but then I was burned by the lack of support for multipart forms (i.e. file uploads), poor async, no option to listen on unix socket (required by my hosting provider's proxy) and long compilation times (not fully fault of Rocket, Rust compiler team has done a lot to speed up compilation since then). In the en…

I tried rocket back then and reached similar conclusions - then I just picked the most popular choice (actix at the time). Actix had its highs and lows but always delivered.

Nowadays I'm on axum (mainly because the API is nice and because it feels like the community is moving in that direction) and the experience is great.

I'm working to rewrite my node.js and python service to Rust to simplify my stack and take care of unreliability and hard to debug occasional bugs.

And I'm also adopting leptos to do frontend development (moving from solid.js - which is already pretty nice)

Re: Rocket v0.5: Stable, Async

#17
Very cool to see this finally go out, and especially the new Foundation. I have to wonder though if it's too late though. I gave up waiting for a new Rocket release years ago and have been doing what Rust web work I've been doing on Axum instead - the integration with Tower is very nice.

Re: Rocket v0.5: Stable, Async

#18
post #14

I like the idea of Rust, its technical merits etc, but good lord this language has some crazy weird and intimidating syntax. I read the code snippets and am just confused as heck. Did it really have to look like this?

Once you get over the initial hurdle, the syntax is extremely consistent and "guessable." By which I mean, once you know the basics you can guess how to do things that you have never done before - and if it doesn't work there's probably a pending RFC that matches your expectations.

For example, you might learn that you can do `if let Some(foo) = option` to check if some option is Some, but to also extract the value from it. Now you might guess that the let conditionals might work elsewhere, and you'd be right! `while let Some(line) = reader.read()` totally works.

Now compare this to the likes of C, where for example `break` appears in a `switch` for some bizarre reason (yes, I know the actual reason) and `case`s don't have braces.

Re: Rocket v0.5: Stable, Async

#19
post #7

I was developing a fairly large web app with Rocket 0.4 (released 2018!) and it started as a good experience, but then I was burned by the lack of support for multipart forms (i.e. file uploads), poor async, no option to listen on unix socket (required by my hosting provider's proxy) and long compilation times (not fully fault of Rocket, Rust compiler team has done a lot to speed up compilation since then). In the en…

> perhaps Rust is not the right choice to make full-stack web apps

This is a good step, but I still wonder if this is the case. I do like some aspects of writing webapps in Rust, but the ecosystem for serious web apps is still woefully immature. There just aren't battle-tested and well-supported solutions for many critical things, including tracing, monitoring, security, etc.

Re: Rocket v0.5: Stable, Async

#20
post #10
post #5

Hate to say that but I’d be happier if this never happened. I think many newcomers think that Rocket is “the web framework” in Rust. And if author goes silent again they will be let down. It casts kinda bad shadow on Rust community but we have better alternatives.

I'm not sure I understand this - I think having different options for web frameworks is great for Rust! Actually, it's probably more useful for Rust than other languages because Rust ends up being used by such a different range of developers and applications, and each framework ends up having such different opinions and providing different levels of abstractions.

Rocket was created by Sergio Benitez. He is almost exclusively the only contributor to the project. Not because people don't want to contribute to it, but because the author wants to have it as sort of his child's brain. And there is nothing bad about that. But recently he said at a conference (as I read on Reddit) that he does not have much time anymore to invest in its development. That means that there is probably no bright future for Rocket. Especially because a batteries-included framework like this takes so much effort to develop and polish.

I think that a website or API backend is the first project for many newcomers to Rust. It would be better for them to have first experience with other frameworks such that they are not let down by Rocket as it might cast a bad light at the whole ecosystem.

Rocket looks tempting because a/ it has a nice website b/ it looks feature complete c/ it is similar to Django/Flask which might make it more familiar d/ other web frameworks don't have particularly appealing documentation.

Post reply on HN