feat(lib): add optional tcp feature, split from runtime
The `HttpConnector` and `AddrListener` types which make use of `tokio::tcp` have been made their own optional feature. This allows using them without requiring the *full* tokio runtime.
This commit is contained in:
17
Cargo.toml
17
Cargo.toml
@@ -27,7 +27,6 @@ futures-util-preview = { version = "=0.3.0-alpha.19" }
|
||||
http = "0.1.15"
|
||||
http-body = "=0.2.0-alpha.1"
|
||||
httparse = "1.0"
|
||||
# h2 = "=0.2.0-alpha.2"
|
||||
h2 = "=0.2.0-alpha.3"
|
||||
iovec = "0.1"
|
||||
itoa = "0.4.1"
|
||||
@@ -35,15 +34,19 @@ log = "0.4"
|
||||
net2 = { version = "0.2.32", optional = true }
|
||||
pin-project = "0.4"
|
||||
time = "0.1"
|
||||
tokio = { version = "=0.2.0-alpha.6", optional = true, default-features = false, features = ["rt-full"] }
|
||||
tower-service = "=0.3.0-alpha.2"
|
||||
tower-make = { version = "=0.3.0-alpha.2a", features = ['io'] }
|
||||
tokio-executor = { version = "=0.2.0-alpha.6", features = ["blocking"] }
|
||||
tokio-executor = "=0.2.0-alpha.6"
|
||||
tokio-io = "=0.2.0-alpha.6"
|
||||
tokio-sync = "=0.2.0-alpha.6"
|
||||
want = "0.3"
|
||||
|
||||
# Optional
|
||||
|
||||
tokio = { version = "=0.2.0-alpha.6", optional = true, default-features = false, features = ["rt-full"] }
|
||||
tokio-net = { version = "=0.2.0-alpha.6", optional = true, features = ["tcp"] }
|
||||
tokio-timer = { version = "=0.3.0-alpha.6", optional = true }
|
||||
want = "0.3"
|
||||
|
||||
|
||||
[dev-dependencies]
|
||||
matches = "0.1"
|
||||
@@ -64,8 +67,12 @@ default = [
|
||||
"runtime",
|
||||
]
|
||||
runtime = [
|
||||
"net2",
|
||||
"tcp",
|
||||
"tokio",
|
||||
]
|
||||
tcp = [
|
||||
"net2",
|
||||
"tokio-executor/blocking",
|
||||
"tokio-net",
|
||||
"tokio-timer",
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user