Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable the runtime feature of hyper when using tokio #1671

Merged
merged 3 commits into from Jan 6, 2023

Conversation

paolobarbolini
Copy link
Contributor

@paolobarbolini paolobarbolini commented Jan 3, 2023

Motivation

Currently axum never enables the runtime feature of hyper, which gates functions like Server::http1_header_read_timeout

Solution

This makes axum enable the runtime feature. The alternative is to import hyper and enable the feature but then Rust Analyzer imports things from hyper instead of axum, which is very annoying.

@davidpdrsn
Copy link
Member

I'm not sure. Feels to me like axum should only enable the features that are necessary to use axum, or very common (such as h2.)

The alternatives sound fine to me.

@davidpdrsn
Copy link
Member

@jplatte what do you think? I don't have any strong feelings about it. Its all gonna change for hyper 1.0 anyway :P

@jplatte
Copy link
Member

jplatte commented Jan 5, 2023

Well since the runtime feature is described as

Enables convenient integration with tokio, providing connectors and acceptors for TCP, and a default executor.

and this is about what features our own tokio dependency activates, it seems fine to me.

@davidpdrsn
Copy link
Member

Alright. Then lets just get it in 😊

@paolobarbolini merging main should fix CI and do you wanna add a changelog entry as well?

@davidpdrsn davidpdrsn merged commit 211de92 into tokio-rs:main Jan 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants