Anyway, it has nothing to do with Serde, which doesn't have a network component. For Serde you'd typically buffer the input first, or use external framing (like line-oriented JSON).
Tokio or async-std timeouts only cancel futures. The dedicated spawn_blocking threadpools also do not support cancellation.
To prevent such cases you would have to spawn the work into a dedicated thread pool and then kill the thread on timeout.
Terminating threads is a very complicated topic though and not generally possible for compiled languages, especially without introducing memory unsafety.
The only real workaround is to have the synchronous code regularly check for cancellation via an atomic bool or similar, and terminate if required.
Native busy-looping or deadlocked threads are tricky to kill safely, but that’s a general problem with threads in non-interpreted languages. Not specific to Serde, not related to Slow loris.
https://github.com/wulf/create-rust-app
Although there's a lot of work left to be done, I'd love to hear feedback, painpoints and ideas you have :)
Hoping to have documentation up at create-rust-app.dev soon~
So I think the work you are doing is going to be valuable for the community. I guess giving an option between the three popular web frameworks (actix, warp, rocket) won't be so easy as you might have very different way of integrating the authentication etc with each. Probably one way to do this is to keep things more modular so that the authentication can be called independently (among other features).
https://github.com/SergioBenitez/Rocket/issues/1405