Make tokio an optional dependency of axum-extra (#2236)

This commit is contained in:
David Pedersen 2023-09-21 09:33:40 +02:00 committed by GitHub
parent 786329d85d
commit 3b3bbb2403
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View file

@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning].
- **added:** `TypedHeader` which used to be in `axum` ([#1850])
- **added:** `Clone` implementation for `ErasedJson` ([#2142])
- **breaking:** Update to prost 0.12. Used for the `Protobuf` extractor
- **breaking:** Make `tokio` an optional dependency
[#1850]: https://github.com/tokio-rs/axum/pull/1850
[#2142]: https://github.com/tokio-rs/axum/pull/2142

View file

@ -14,7 +14,7 @@ version = "0.7.4"
[features]
default = []
async-read-body = ["dep:tokio-util", "tokio-util?/io"]
async-read-body = ["dep:tokio-util", "tokio-util?/io", "dep:tokio"]
cookie = ["dep:cookie"]
cookie-private = ["cookie", "cookie?/private"]
cookie-signed = ["cookie", "cookie?/signed"]
@ -26,7 +26,8 @@ json-lines = [
"dep:tokio-util",
"dep:tokio-stream",
"tokio-util?/io",
"tokio-stream?/io-util"
"tokio-stream?/io-util",
"dep:tokio",
]
multipart = ["dep:multer"]
protobuf = ["dep:prost"]
@ -44,7 +45,6 @@ http-body = "0.4.4"
mime = "0.3"
pin-project-lite = "0.2"
serde = "1.0"
tokio = "1.19"
tower = { version = "0.4", default_features = false, features = ["util"] }
tower-layer = "0.3"
tower-service = "0.3"
@ -59,6 +59,7 @@ percent-encoding = { version = "2.1", optional = true }
prost = { version = "0.12", optional = true }
serde_html_form = { version = "0.2.0", optional = true }
serde_json = { version = "1.0.71", optional = true }
tokio = { version = "1.19", optional = true }
tokio-stream = { version = "0.1.9", optional = true }
tokio-util = { version = "0.7", optional = true }