Description
Is your feature request related to a problem? Please describe.
Add a Server
to the runtime functionality of https://github.com/hyperium/hyper-util.
For now I would only add one for Tokio
, and thus perhaps best kept somewhere in that realm?
Goal would be to add something similar to the server of hyper 0.14
. This would allow other libraries like Tonic, Axum and other high level libraries to use it instead of having to define their own very similar logic. For projects like my own (rama
) I do not need it.
Describe the solution you'd like
A ready to use Server
struct and builder in hyper-util
crate for the tokio
runtime.
Describe alternatives you've considered
Axum
provides in their master version (unreleased) an axum::serve
function which does that, but seems a bit silly that for high level crates like axum
each need to provide their own? In tower-async
(a fork of Tower
) I also for now need to each time start my own loop and (tcp) listener, which is a bit silly for such high level examples. Again we can all keep writing our own hyper
server, and for some purposes that is desired (like in Rama
). But for most users the default Server
is probably fine. Even if just to begin with.