Skip to content

Commit

Permalink
Only enable hyper dependency when needed (#2350)
Browse files Browse the repository at this point in the history
  • Loading branch information
tottoto authored Nov 24, 2023
1 parent e3d34bb commit a9ac524
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions axum/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []
Expand All @@ -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"]
Expand All @@ -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"
Expand All @@ -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 }
Expand Down

0 comments on commit a9ac524

Please sign in to comment.