4 ms·
Yes, if you want a mature web framework that doesn't force you to use async then Rocket already exists, which is multithreaded and quite performant - and now al
by Qwuke 1y ago
Yes, if you want a mature web framework that doesn't force you to use async then Rocket already exists, which is multithreaded and quite performant - and now allows you to use async if you want to.
Feather seems fundamentally single threaded and requires more boilerplate for something pretty simple. So I'm not sure the claim about developer experience holds up to scrutiny here either.
- gfs 1y agoReading the latest stable documentation [0], it appears that you have to use async? [0]: https://rocket.rs/guide/v0.5/upgrading/#stable-and-async-support https://rocket.rs/guide/v0.5/upgrading/#stable-and-async-sup...
- deleted 1y ago[deleted]
- Qwuke 1y agoSorry, so you can use synchronous functions for writing middleware and routes, but the rocket core does use tokio. Not all async Rust webframeworks let you do away with async and futures entirely in your business logic.
- gfs 1y agoSo the caveat is you need to call `spawn_blocking` with synchronous functions. I see.
- Qwuke 1y agoWith a framework like Axum, yes, but with Rocket, no - you can just declare synchronous functions and pass them as a route handler, e.g.: https://github.com/Qwuke/recurse-ring/blob/main/src/main.rs#L185-L191 https://github.com/Qwuke/recurse-ring/blob/main/src/main.rs#... If you're averse to touching async fn's or tokio APIs _at all_, it's nice devex.