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 end, I found hacky solutions for all these issues, but 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).
Past me would have loved this update. Thank you in his name!
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)
> 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.
The problem I ran into with Rocket was that because it had stagnated for so long it was incompatible with currently maintained versions of some of the dependencies (I want to say diesel, but I could be wrong).
I'm glad to see that it's been picked up again and 0.5 has been released. I got used to Axum (and rather like it), but in some ways I thought Rocket was friendlier to use.
Yes and no. On the one hand, you want to pick dependencies that have staying power. On the same hand, having mindshare is necessary for the durability.
Hard to resolve the core issue here, since it's ultimately social rather than technical.
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).
> 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.
His point seems to have been that while version .4 had those missing pieces, the problems he mentions have now been addressed in .5. Maybe Full stack web with rust is more imaginable now. In any case, I plan to try it.
> 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.
The `tracing` ecosystem is IMO pretty good, and even works with Sentry for various frameworks (well largely it's all tower based anyway)
Not sure what you mean by monitoring. What do you expect (and do you have any examples where other languages provide monitoring solutions?).
Security wise, I've not had any issues finding crates for specific things I needed either, but security is a broad domain (so what did you find lacking in particular?)
Well that's the thing about it - it mostly appears to be there, but often proves to be immature. Meaning it technically works, but most of them are inflexible, single-person projects that occasionally completely redo their API. They work their way, and good luck if you want to do anything slightly different, and unpredictable things might happen if you try to combine several things together. Not exactly confidence-inspiring to base an important production web app upon.
Tracing appears to work, but I was trying to get OpenTelemetry trace IDs into our log messages with a custom layer, which I needed anyways to match our standardized output format that every other web app in every other language can be set up to log as. I still haven't figured out how to get the current OTel TraceID in the context of Layer.on_event - there's like 4 different ways that look like they ought to work, but none of them actually do.
I wanted to set up Prometheus metrics as well. I hadn't dug too deep into that one, but it didn't seem clear what the best / most mature crates were for that or how they'd integrate with everything else.
I was able to put together a Tower Layer for our custom internal request signing system - good on them for having a standardized middleware system, though it'd be nice if more of the Rust HTTP ecosystem actually used it. I think Rocket still doesn't. It was also rather a struggle to figure out how to do things I would expect to be basic, like process the request body in the context of a Layer middleware while still leaving it available to downstream Layers and the final request handler.
Tracing is extremely opinionated in the name of performance. In practice this means you can end up in a position where you've got to take some huge chunk of code to change a small part.
Past me would have loved this update. Thank you in his name!