hyperium / hyperium/hyper

using hyper::client::Builder w/out default runtime is confusing

Open
#1,537 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

I recently completed an upgrade from 0.11 to 0.12 where I needed to manually construct a Reactor, Executor (ThreadPool), and HttpConnector, rather than use the rt::run module. Happy to provide more context on why, but I think it's somewhat orthogonal to the confusion detailed below.

It was surprising / confusing to me that failing to set client::Builder::executor explicitly when using a custom Reactor (via HttpConnector) fell back to using the "batteries included" executor; since that TL wasn't initialized I ended up with spawn failures. It seems to me that the builder API should either leverage the default runtime (which it already does well), or should require all of the runtime components to be explicitly specified. The half-default + half-explicit setup doesn't strike me as a real-world mode of operation, tho I'm sure y'all would have more insight into "hyper in practice".

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 hyper::client::Builder, HttpConnector, and the custom Reactor and ThreadPool setup described in the issue. Trace how executor selection behaves when Builder::executor is omitted and how spawn failures surface without the default runtime. Done means the runtime configuration behavior is made unambiguous and covered by an appropriate test or documented API contract.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
api
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.