hyper-util: add (tokio) Server struct and builder (inspired by Hyper 0.14)
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.3k
- Forks
- 1.8k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 14
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing hyper-util's runtime functionality and the Hyper 0.14 server implementation that this request references. The work is complete when the hyper-util crate provides a ready-to-use Server struct and builder for the Tokio runtime.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100