Live data from Hacker News

Is Rust Web Yet?

arewewebyet.org

1–10 of 183 posts

Re: Is Rust Web Yet?

#2
We’ve been able to build a mobile/web hybrid ride-sharing app using Yew/GraphQL. A robot Lego-like 3D builder, with Yew interop with ThreeJS. And a full 3D web game with Yew hosting a Bevy game. Everything packed with trunk.

It’s still a bit rough around the edges but the Rust benefits more than makes up for it.

Re: Is Rust Web Yet?

#3
"Rust has mature and production ready frameworks in Actix Web and Rocket"

Why is Rocket considered production ready when it's only just at version 0.5? Similar <1.0 stories can be found on crates for sqlx, rusqlite, and postgres. Am I wrong in assuming the API must be quite stable before it can receive the 'production ready' label?

Re: Is Rust Web Yet?

#4
post #3

"Rust has mature and production ready frameworks in Actix Web and Rocket" Why is Rocket considered production ready when it's only just at version 0.5? Similar <1.0 stories can be found on crates for sqlx, rusqlite, and postgres. Am I wrong in assuming the API must be quite stable before it can receive the 'production ready' label?

That’s correct, the creator has been uber meticulous and methodical in his versioning and using stable Rust parts.

Re: Is Rust Web Yet?

#7
I'm happy to see some new Rust web frameworks that are doing away with attributes and returning to good old iron programmatic style. I might port some old plugins of mine from iron to Warp or Tide. Any opinions on which one to pick?

Re: Is Rust Web Yet?

#8
> Yes! And it's freaking fast!

Going by these benchmarks (click around to find your own use case) Rust is definitely fast, but not (much) faster than many other languages, including Javascript. https://www.techempower.com/benchmarks/#section=data-r20&hw=...

When it comes to JSON serializers, there is a Java framework that is faster than Rust, which is interesting to say the least. When you start comparing actual fully-features frameworks, many Rust libraries even lose their advantage!

There are definite benefits to Rust web frameworks (despite the minimal speed diff, Rocket or similar can have less than half the RAM requirements that other languages run into!) but just because Rust compiles to machine code doesn't mean it'll revolutionize your web application.

> These provide everything you’d expect from a web framework, from routing and middleware, to templating, and JSON/form handling.

One problem I've run into is that I wanted to give Rust a try for a basic CRUD application but the features just weren't built in or available in packages. Some frameworks were missing CSRF, others were missing multipart/form uploads, and so on. Online discussions often end up concluding that "it's easy to write the middleware yourself, see this hacky POC", but this type of code is easy to mess up and easy to break with API upgrades.

Tide and Warp seem to have matured quite well, so I guess I'll have to give them a go at some point, but I'm a little sceptical. The status of this issue (https://github.com/http-rs/tide/issues/852) is a little disheartening...

Re: Is Rust Web Yet?

#9
This content, while still accurate (Rust is Web-ready, and all the frameworks listed are excellent!), is missing out a few credible and recent options.

In particular I want to shout out for Axum (https://github.com/tokio-rs/axum), from the folks who brought us Tokio. I've been building with it for the past few weeks and have enjoyed every minute.

I started with Warp, but ended up struggling a bit with middleware. I tried Axum as a web framework wrapper for tower (https://crates.io/crates/tower), and never ended up bothering to reintegrate back into Warp.

Post reply on HN