[package]
name = "download"
version.workspace = true
edition.workspace = true
license.workspace = true

[features]
default = ["reqwest-rustls-tls", "reqwest-native-tls"]
curl-backend = ["curl"]
reqwest-native-tls = [
  "reqwest/native-tls",
  "dep:reqwest",
  "dep:env_proxy",
  "dep:tokio-stream",
]
reqwest-rustls-tls = [
  "reqwest/rustls-tls-manual-roots-no-provider",
  "dep:env_proxy",
  "dep:reqwest",
  "dep:rustls",
  "dep:rustls-platform-verifier",
  "dep:tokio-stream",
]

[dependencies]
anyhow.workspace = true
curl = { version = "0.4.44", optional = true }
env_proxy = { version = "0.4.1", optional = true }
reqwest = { version = "0.12", default-features = false, features = ["blocking", "gzip", "socks", "stream"], optional = true }
rustls = { version = "0.23", optional = true, default-features = false, features = ["logging", "aws_lc_rs", "tls12"] }
rustls-platform-verifier = { version = "0.5", optional = true }
thiserror.workspace = true
tokio-stream = { workspace = true, optional = true }
url.workspace = true

[dev-dependencies]
http-body-util = "0.1.0"
hyper = { version = "1.0", default-features = false, features = ["server", "http1"] }
hyper-util = { version = "0.1.1", features = ["tokio"] }
tempfile.workspace = true
tokio = { workspace = true, default-features = false, features = ["sync"] }

[lints]
workspace = true
