Skip to content

hyper-util's "client-legacy" feature forces use of mio, but wasn't required in hyper 0.14.x #3842

Description

@erickt

Version
List the version(s) of hyper, and any relevant hyper dependency (such as h2 if this is related to HTTP/2).

hyper 1.6.0, hyper-util 0.1.10

Platform
The output of uname -a (UNIX), or version and 32 or 64-bit (Windows)

Fuchsia

Description
Enter your issue details here.
One way to structure the description:

I work on the Fuchsia operating system, and we're running into problems updating hyper from 0.14.x to 1.x with this in our Cargo.toml:

hyper = { version = "0.14.19", default-features = false, features = ["stream", "http1", "client", "server"] }
hyper-rustls = { version = "0.24.2", default-features = false }
...

This is requiring us to also update our hyper-rustls from 0.24.2 to 0.27.5, which now depends on hyper-util 0.1.x to wrap the client library. This causes our version of tokio to enable the mio feature, which doesn't support Fuchsia and fails to compile.

From what I can tell, this worked back in hyper 0.14.x because these subset of feature flags allowed hyper-rustls 0.24.x to expose most of it's functionality it needed based off the lower level connection API. It seems that hyper-util 0.1.10's client-legacy feature merged that functionality together that requires tokio. Would it be possible to restore this old functionality? It'd be unfortunate for us to have to essentially fork hyper-rustls and hyper-util to allow it to work with a non-tokio executor. I'd be happy to help with a refactor there's interest in this.

Activity

  1. added
    C-bugCategory: bug. Something is wrong. This is bad!
    on Jan 29, 2025
  2. seanmonstar commented on Jan 29, 2025

    @seanmonstar
    Member

    Woops, sorry about that! I don't mean for the utilities to require being used with Tokio. I've love any help in making this more flexible!

  3. kpwebb commented on Mar 13, 2025

    @kpwebb

    Just encountered a similar problem trying to build for WASM. It looks like the mio dep is sneaking in via h2 -> tokio

    That said, I'm not sure yet why the tokio = { version = "1", features = ["io-util"] } in h2 is triggering mio inclusion.

    If this is something you're open to patching I'll investigate if a hyper or h2 fix is possible.

  4. seanmonstar commented on Mar 14, 2025

    @seanmonstar
    Member

    That shouldn't be from h2. It's likely something in hyper-util.

    I welcome loosening it, if someone wants to send a PR 🙏

  5. self-assigned this
    on Oct 7, 2026
  6. added a commit that references this issue on Oct 8, 2026
    0dd0bec
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

A-clientArea: client.C-bugCategory: bug. Something is wrong. This is bad!E-pr-welcomeEffort: a pull request is welcome.K-hyper-utilCrate: hyper-util

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions