Live data from Hacker News

Rocket v0.5: Stable, Async

rocket.rs

51–59 of 59 posts

Re: Rocket v0.5: Stable, Async

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

How's your experience with Leptos so far? I gave it a try over a weekend for my pet project, felt that it's not ready for prime time yet, so decided to go ahead with Dioxus (which doesn't mean that it's more stable or anything).

Re: Rocket v0.5: Stable, Async

#52
post #41
post #4

So glad to see 0.5 out of release candidacy! I really appreciated how async functions and event streams were handled in 0.5, and just seeing this version land will make it so much easier to justify using Rocket in production. I still think Rocket is the most concise web framework for Rust after 5 years now of using it in projects and even newer frameworks, and also is one of the best examples of how ergonomic you can…

What’s your productivity like using Rust for web development? Rocket seems like a lot of visual noise vs. Laravel/Rails/Django.

So Rust code may look jarring in-general compared to dynamic languages, and this is because Rust is a strongly typed language, but on top of that its type system also gives guarantees around data races that other typed languages don't prevent. So most Rust frameworks seem "noisy" when doing more than Hello World in my experience.

In my experience Rocket is intentionally less "batteries-included" than newer versions of frameworks like Rails and Django (especially around querying databases), but provides an opinionated approach that has minimal boilerplate in the same spirit as those frameworks. If you just want to write a Rust web service and get to the business logic, Rocket is a great choice especially if you're coming from another language.

Re: Rocket v0.5: Stable, Async

#53

Maybe one day I'll use Rust for backend dev. Everyone wants something different, but I'll use Django, and deal with Python's messiness until we get a Rust framework that has a high-level ORM, built in auth, admin, etc. And would prefer no Async.

Coming from normal dev work myself, I’m drawn to dotnet nowadays. If you ever make the chance, it’s real easy to get started and do what Python does in aspnet, scripting, whatever.

Re: Rocket v0.5: Stable, Async

#54
post #41
post #4

So glad to see 0.5 out of release candidacy! I really appreciated how async functions and event streams were handled in 0.5, and just seeing this version land will make it so much easier to justify using Rocket in production. I still think Rocket is the most concise web framework for Rust after 5 years now of using it in projects and even newer frameworks, and also is one of the best examples of how ergonomic you can…

What’s your productivity like using Rust for web development? Rocket seems like a lot of visual noise vs. Laravel/Rails/Django.

It's a compromise. Many of the things that are runtime errors in those three will be compile time errors in Rust, but the cost of that is that you'll have those details in your face/code all the time.

I've found that chatgpt helps a lot in making Rust more approachable, and the benefits of those more easy going languages are diminishing due to that.

Re: Rocket v0.5: Stable, Async

#55
post #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.

For compiled templates I have used Askama: https://crates.io/crates/askama

My biggest gripe is that when a template doesn't compile the error messages are quite useless, but other than that it is great.

Re: Rocket v0.5: Stable, Async

#57

Earlier quoted context omitted.

> feels like the community is moving in that direction Likely unpopular opinion here but the Rust community is incredibly fickle and tends to attract " shiny new thing " types. I'd be very cautious hitching your wagon to whatever horse they are championing in 202X. Use what is best for your needs.

In this case, "community is moving in that direction" means that over the last 3+ years, a significant amount of middleware and tooling has grown in the Tower ecosystem, which Axum is based on. So the network effect is the draw here, not a hype cycle.

Axum has regular breaking changes. I have much love for them but to pretend it's a stable platform to develop from is not realistic.

Maybe shiny new thing people enjoy fixing that stuff but I personally like stability in my frameworks.

Re: Rocket v0.5: Stable, Async

#58
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?

This is definitely not helped by Rocket. Even I, knowing Rust well, don't enjoy the way Rocket puts so much logic into attribute macros and function signatures.

Yeah, I generally have no issue with Rust's syntax but Rocket's API is certainly something.

Re: Rocket v0.5: Stable, Async

#59
post #29

Earlier quoted context omitted.

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…

>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. I've talked to Sergio before in-person and got a completely different take of how he views contributions, but also, apparently he's explicitly trying to democratize Rocket's governance as part of th…

I'm a full-stack developer that started my work on Bend using Rocket and then migrated to Axum. Would be very happy to contribute/be a part of a community initiative like the one you describe
Post reply on HN