Wanted: Rust sync web framework
Sep. 8th, 2021 12:14 pm![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
tl;dr: Please recommend me a high-level Rust server-side web framework which is sync and does not plan to move to an async api.
Why
Async Rust gives somewhat higher performance. But it is considerably less convenient and ergonomic than using threads for concurrency. Much work is ongoing to improve matters, but I doubt async Rust will ever be as easy to write as sync Rust.
"Even" sync multithreaded Rust is very fast (and light on memory use) compared to many things people write web apps in. The vast majority of web applications do not need the additional performance (which is typically a percentage, not a factor).
So it is rather disappointing to find that all the review articles I read, and all the web framework authors, seem to have assumed that async is the inevitable future. There should be room for both sync and async. Please let universal use of async not be the inevitable future!
What
I would like a web framework that provides a sync API (something like Rocket 0.4's API would be ideal) and will remain sync. It should probably use (async) hyper underneath.
So far I have not found one single web framework on crates.io that neither is already async nor suggests that its authors intend to move to an async API. Some review articles I found even excluded sync frameworks entirely!
Answers in the comments please :-).
(no subject)
Date: 2021-09-08 12:04 pm (UTC)Iron
Date: 2021-09-08 05:22 pm (UTC)I've used iron for a few projects. It's not particularly maintained any more, but I'm not aware of any big outstanding issues with it.
Re: Iron
Date: 2021-09-09 09:48 am (UTC)(no subject)
Date: 2021-09-09 05:11 am (UTC)Rocket
Date: 2021-09-09 09:48 am (UTC)Re: Rocket
Date: 2021-09-09 10:33 am (UTC)(no subject)
Date: 2021-09-10 11:06 am (UTC)Rouille has been unmaintained for a while and had some RustSec issues last time I checked, but there has recently been new activity/releases on the repo . Fingers crossed for long term support.