Files
axum/axum-extra/Cargo.toml
T

158 lines
5.0 KiB
TOML

[package]
categories = ["asynchronous", "network-programming", "web-programming"]
description = "Extra utilities for axum"
edition = "2021"
rust-version = { workspace = true }
homepage = "https://github.com/tokio-rs/axum"
keywords = ["http", "web", "routing"]
license = "MIT"
name = "axum-extra"
readme = "README.md"
repository = "https://github.com/tokio-rs/axum"
version = "0.12.6"
[package.metadata.docs.rs]
all-features = true
[package.metadata.cargo_check_external_types]
allowed_external_types = [
"axum::*",
"axum_core::*",
"axum_macros::*",
"bytes::*",
"cookie::*",
"futures_core::*",
"futures_util::*",
"headers",
"headers_core::*",
"http::*",
"http_body::*",
"prost::*",
"serde_core::*",
"tokio::*",
"tower_layer::*",
"tower_service::*",
]
[features]
default = ["tracing"]
async-read-body = ["dep:tokio-util", "tokio-util?/io", "dep:tokio"]
cached = ["dep:axum"]
file-stream = [
"dep:tokio-util",
"tokio-util?/io",
"dep:tokio",
"tokio?/fs",
"tokio?/io-util",
]
attachment = ["dep:tracing"]
error-response = ["dep:tracing", "tracing/std"]
cookie = ["dep:cookie"]
cookie-private = ["cookie", "cookie?/private"]
cookie-signed = ["cookie", "cookie?/signed"]
cookie-key-expansion = ["cookie", "cookie?/key-expansion"]
erased-json = ["dep:serde_core", "dep:serde_json", "dep:typed-json"]
form = [
"dep:axum",
"dep:form_urlencoded",
"dep:serde_core",
"dep:serde_html_form",
"dep:serde_path_to_error",
]
handler = ["dep:axum"]
json-deserializer = ["dep:serde_core", "dep:serde_json", "dep:serde_path_to_error"]
json-lines = [
"dep:serde_core",
"dep:serde_json",
"dep:tokio-util",
"dep:tokio-stream",
"tokio-util?/io",
"tokio-stream?/io-util",
"dep:tokio",
]
middleware = ["dep:axum"]
multipart = ["dep:multer", "dep:fastrand"]
protobuf = ["dep:prost"]
routing = ["axum/original-uri", "dep:rustversion"]
query = [
"dep:form_urlencoded",
"dep:serde_core",
"dep:serde_html_form",
"dep:serde_path_to_error",
]
tracing = ["axum-core/tracing", "axum/tracing", "dep:tracing"]
typed-header = ["dep:headers"]
typed-routing = [
"routing",
"dep:axum-macros",
"dep:percent-encoding",
"dep:serde_core",
"dep:serde_html_form",
"dep:form_urlencoded",
]
with-rejection = ["dep:axum"]
# Enabled by docs.rs because it uses all-features
# Enables upstream things linked to in docs
__private_docs = ["axum/json", "axum/query", "dep:serde", "dep:tower"]
[dependencies]
axum-core = { path = "../axum-core", version = "0.5.6" }
bytes = "1.1.0"
futures-core = "0.3"
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"
mime = "0.3"
pin-project-lite = "0.2"
tower-layer = "0.3"
tower-service = "0.3"
# optional dependencies
axum = { path = "../axum", version = "0.8.9", default-features = false, optional = true }
axum-macros = { path = "../axum-macros", version = "0.5.1", optional = true }
cookie = { package = "cookie", version = "0.18.0", features = ["percent-encode"], optional = true }
fastrand = { version = "2.1.0", optional = true }
form_urlencoded = { version = "1.1.0", optional = true }
headers = { version = "0.4.0", optional = true }
multer = { version = "3.0.0", optional = true }
percent-encoding = { version = "2.1", optional = true }
prost = { version = "0.14", optional = true }
rustversion = { version = "1.0.9", optional = true }
serde_core = { version = "1.0.221", optional = true }
# DO NOT update. axum itself uses serde_html_form 0.3.x which has slightly
# different behavior in some edge cases. This feature here is kept (deprecated)
# to let people transition to that easier (fewer breaking changes to deal with
# at once if they keep using axum_extra's `Query` / `Form` initially when going
# to axum 0.9).
serde_html_form = { version = "0.2.0", optional = true }
serde_json = { version = "1.0.71", optional = true }
serde_path_to_error = { version = "0.1.8", optional = true }
tokio = { version = "1.19", optional = true }
tokio-stream = { version = "0.1.9", optional = true }
tokio-util = { version = "0.7", optional = true }
tracing = { version = "0.1.37", default-features = false, optional = true }
typed-json = { version = "0.1.1", optional = true }
# doc dependencies
serde = { version = "1.0.221", optional = true }
tower = { version = "0.5.2", default-features = false, features = ["util"], optional = true }
[dev-dependencies]
axum = { path = "../axum", features = ["macros", "__private"] }
axum-macros = { path = "../axum-macros", features = ["__private"] }
hyper = "1.0.0"
reqwest = { version = "0.12", default-features = false, features = ["json", "stream", "multipart"] }
serde = { version = "1.0.221", features = ["derive"] }
serde_json = "1.0.71"
tempfile = "3.23.0"
tokio = { version = "1.14", features = ["full"] }
tower = { version = "0.5.2", features = ["util"] }
tower-http = { version = "0.6.0", features = ["map-response-body", "timeout"] }
tracing-subscriber = "0.3.20"
[lints]
workspace = true