hyperium / hyperium/hyper

Enable Specifying Dependencies of `serve`

Open
#1,704 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-server B-rfc
Dominant language
Rust
Stars
16.3k
Forks
1.8k
Avg merge
1d 22h
Merged PRs (30d)
14

Description

Currently, several bounds of the serve function rely on private traits and types which aren't exposed from hyper. This makes it impossible to create a function in another library which accepts a compatible Executor type and passes it onto the serve function. Would it be possible to either expose these traits, or expose the Exec enum which implements them, so that libraries which wrap hyper can pass on this dependency to their users?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the serve bounds in src/server/mod.rs around the linked location, then inspect the Exec enum in src/common/exec.rs and its implemented traits. Determine which public API would let wrapper libraries pass a compatible executor to serve; done means an external library can express and forward that dependency without relying on private hyper items.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
api, backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.