diff --git a/axum/Cargo.toml b/axum/Cargo.toml index b4b67154..bb915d00 100644 --- a/axum/Cargo.toml +++ b/axum/Cargo.toml @@ -14,8 +14,8 @@ repository = "https://github.com/tokio-rs/axum" [features] default = ["form", "http1", "json", "matched-path", "original-uri", "query", "tokio", "tower-log"] form = ["dep:serde_urlencoded"] -http1 = ["hyper/http1"] -http2 = ["hyper/http2"] +http1 = ["dep:hyper", "hyper?/http1"] +http2 = ["dep:hyper", "hyper?/http2"] json = ["dep:serde_json", "dep:serde_path_to_error"] macros = ["dep:axum-macros"] matched-path = [] @@ -25,7 +25,7 @@ query = ["dep:serde_urlencoded"] tokio = ["dep:hyper-util", "dep:tokio", "tokio/net", "tokio/rt", "tower/make"] tower-log = ["tower/log"] tracing = ["dep:tracing", "axum-core/tracing"] -ws = ["tokio", "dep:tokio-tungstenite", "dep:sha1", "dep:base64"] +ws = ["dep:hyper", "tokio", "dep:tokio-tungstenite", "dep:sha1", "dep:base64"] # Required for intra-doc links to resolve correctly __private_docs = ["tower/full", "dep:tower-http"] @@ -38,7 +38,6 @@ futures-util = { version = "0.3", default-features = false, features = ["alloc"] http = "1.0.0" http-body = "1.0.0" http-body-util = "0.1.0" -hyper = { package = "hyper", version = "1.0.0", features = ["server", "http1"] } itoa = "1.0.5" matchit = "0.7" memchr = "2.4.1" @@ -54,6 +53,7 @@ tower-service = "0.3" # optional dependencies axum-macros = { path = "../axum-macros", version = "0.3.7", optional = true } base64 = { version = "0.21.0", optional = true } +hyper = { version = "1.0.0", optional = true } hyper-util = { version = "0.1.1", features = ["tokio", "server", "server-auto"], optional = true } multer = { version = "2.0.0", optional = true } serde_json = { version = "1.0", features = ["raw_value"], optional = true }