Add support for Tokio (async)

This commit is contained in:
Aram 🍐 2021-07-31 12:24:11 -04:00
parent 36202d9f1f
commit 5550963ae9
8 changed files with 547 additions and 3 deletions

View file

@ -15,9 +15,21 @@ license = "MIT"
[dependencies]
shell-words = "1.0.0"
rustls = { version = "0.19", optional = true, features = ["dangerous_configuration"] }
rustls = { version = "0.19", optional = true }
webpki = { version = "0.21", optional = true }
webpki-roots = { version = "0.21", optional = true }
tokio = { version = "1", optional = true, features = ["net", "io-util", "rt"] }
tokio-rustls = { version = "0.22", optional = true }
[features]
ssl = ["rustls", "webpki", "webpki-roots"]
default = []
ssl = ["rustls", "rustls/dangerous_configuration", "webpki", "webpki-roots"]
async = ["tokio"]
async-ssl = ["async", "tokio-rustls", "ssl"]
# a feature gate for examples
async-rt = ["tokio/rt-multi-thread", "tokio/macros"]
[[example]]
name = "async"
required-features = ["async-rt"]