-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
Description
- I have looked for existing issues (including closed) about this
Bug Report
Version
├── axum v0.7.1
│ ├── axum-core v0.4.0
├── axum-extra v0.9.0
│ ├── axum v0.7.1 (*)
│ ├── axum-core v0.4.0 (*)
Platform
Linux [..] 6.2.0-36-generic #37-Ubuntu SMP PREEMPT_DYNAMIC Wed Oct 4 10:14:28 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Description
The issue title says it all: After disabling the "http2" feature in axum, the h2
crate is still getting built in in the cargo build process if the "tokio" feature is enabled. I use these (and no hyper dep):
axum = { version = "0.7", default-features = false, features = ["http1", "tokio"] }
axum-extra = { version = "0.9", features = ["cookie"] }
Suspected cause
The reason for this unexpected behavior appears to be that hyper's "http2" feature is still enabled through the optional hyper-util
dependency with the "server-auto" feature enabled, which is enabled in axum
when enabling the "tokio" feature.
dayvejones, Foorack, xfmoulet and andersk