Files
hyper/Cargo.toml
Sean McArthur d127201ef2 feat(rt): make tokio runtime optional
A Cargo feature `runtime` is added, which is enabled by default, that
includes the following:

- The `client::HttpConnector`, which uses `tokio::net::TcpStream`.
- The `server::AddrStream`, which uses `tokio::net::TcpListener`.
- The `hyper::rt` module, which includes useful utilities to work with
  the runtime without needing to import `futures` or `tokio` explicity.

Disabling the feature removes many of these niceties, but allows people
to use hyper in environments that have an alternative runtime, without
needing to download an unused one.
2018-04-23 16:56:26 -07:00

122 lines
2.3 KiB
TOML

[package]
name = "hyper"
version = "0.12.0-pre.0" # don't forget to update html_root_url
description = "A modern HTTP library."
readme = "README.md"
homepage = "https://hyper.rs"
documentation = "https://docs.rs/hyper"
repository = "https://github.com/hyperium/hyper"
license = "MIT"
authors = ["Sean McArthur <sean@seanmonstar.com>"]
keywords = ["http", "hyper", "hyperium"]
categories = ["network-programming", "web-programming::http-client", "web-programming::http-server"]
publish = false # pre
include = [
"Cargo.toml",
"LICENSE",
"src/**/*"
]
[dependencies]
bytes = "0.4.4"
futures = "0.1.21"
futures-cpupool = { version = "0.1.6", optional = true }
futures-timer = "0.1.0"
http = "0.1.5"
httparse = "1.0"
h2 = "0.1.5"
iovec = "0.1"
log = "0.4"
net2 = { version = "0.2.32", optional = true }
time = "0.1"
tokio = { version = "0.1.5", optional = true }
tokio-executor = { version = "0.1.0", optional = true }
tokio-io = "0.1"
tokio-reactor = { version = "0.1", optional = true }
tokio-tcp = { version = "0.1", optional = true }
want = "0.0.3"
[dev-dependencies]
num_cpus = "1.0"
pretty_env_logger = "0.2.0"
spmc = "0.2"
url = "1.0"
[features]
default = ["runtime"]
nightly = []
runtime = [
"futures-cpupool",
"net2",
"tokio",
"tokio-executor",
"tokio-reactor",
"tokio-tcp",
]
[[example]]
name = "client"
path = "examples/client.rs"
required-features = ["runtime"]
[[example]]
name = "hello"
path = "examples/hello.rs"
required-features = ["runtime"]
[[example]]
name = "multi_server"
path = "examples/multi_server.rs"
required-features = ["runtime"]
[[example]]
name = "params"
path = "examples/params.rs"
required-features = ["runtime"]
[[example]]
name = "send_file"
path = "examples/send_file.rs"
required-features = ["runtime"]
[[example]]
name = "server"
path = "examples/server.rs"
required-features = ["runtime"]
[[example]]
name = "web_api"
path = "examples/web_api.rs"
required-features = ["runtime"]
[[bench]]
name = "end_to_end"
path = "benches/end_to_end.rs"
required-features = ["runtime"]
[[bench]]
name = "server"
path = "benches/server.rs"
required-features = ["runtime"]
[[test]]
name = "client"
path = "tests/client.rs"
required-features = ["runtime"]
[[test]]
name = "integration"
path = "tests/integration.rs"
required-features = ["runtime"]
[[test]]
name = "server"
path = "tests/server.rs"
required-features = ["runtime"]