mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-04-24 22:30:03 +00:00
Add new feature trust-dns
to lib & bin (#318)
* Add new feature `trust-dns` to lib & bin * Enable `trust-dns` feature by default Because the `getaddrinfo` is a poorly designed API. * USe default feature set on windows CI because wintls on the CI does not support TLS 1.3 and trust-dns only support dns over https if rustls is used. Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
846e7ead91
commit
4def4d08fd
4 changed files with 259 additions and 7 deletions
|
@ -35,7 +35,7 @@ tokio = { version = "1.20.1", features = ["rt-multi-thread"], default-features =
|
|||
embed-resource = "1.7.3"
|
||||
|
||||
[features]
|
||||
default = ["static", "zlib-ng", "rustls", "fancy-no-backtrace"]
|
||||
default = ["static", "zlib-ng", "rustls", "trust-dns", "fancy-no-backtrace"]
|
||||
|
||||
mimalloc = ["dep:mimalloc"]
|
||||
|
||||
|
@ -47,6 +47,8 @@ zlib-ng = ["binstall/zlib-ng"]
|
|||
rustls = ["binstall/rustls"]
|
||||
native-tls = ["binstall/native-tls"]
|
||||
|
||||
trust-dns = ["binstall/trust-dns"]
|
||||
|
||||
fancy-no-backtrace = ["miette/fancy-no-backtrace"]
|
||||
fancy-with-backtrace = ["fancy-no-backtrace", "miette/fancy"]
|
||||
|
||||
|
|
|
@ -42,6 +42,7 @@ thiserror = "1.0.32"
|
|||
tinytemplate = "1.2.1"
|
||||
tokio = { version = "1.20.1", features = ["macros", "rt", "process", "sync", "signal"], default-features = false }
|
||||
toml_edit = { version = "0.14.4", features = ["easy"] }
|
||||
trust-dns-resolver = { version = "0.21.2", optional = true, default-features = false, features = ["dnssec-ring"] }
|
||||
url = { version = "2.2.2", features = ["serde"] }
|
||||
xz2 = "0.1.7"
|
||||
|
||||
|
@ -69,5 +70,16 @@ pkg-config = ["zstd/pkg-config"]
|
|||
|
||||
zlib-ng = ["flate2/zlib-ng"]
|
||||
|
||||
rustls = ["crates_io_api/rustls", "reqwest/rustls-tls"]
|
||||
native-tls = ["reqwest/native-tls"]
|
||||
rustls = [
|
||||
"crates_io_api/rustls",
|
||||
"reqwest/rustls-tls",
|
||||
|
||||
# Enable the following features only if trust-dns-resolver is enabled.
|
||||
"trust-dns-resolver?/dns-over-rustls",
|
||||
# trust-dns-resolver currently supports https with rustls
|
||||
"trust-dns-resolver?/dns-over-https-rustls",
|
||||
]
|
||||
native-tls = ["reqwest/native-tls", "trust-dns-resolver?/dns-over-native-tls"]
|
||||
|
||||
# Enable trust-dns-resolver so that features on it will also be enabled.
|
||||
trust-dns = ["trust-dns-resolver", "reqwest/trust-dns"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue