Files
h2/Cargo.toml
Eliza Weisman 00ca534c4a Update examples to use new Tokio (#316)
The old `tokio-core` crate is deprecated in favour of the `tokio` crate,
which also provides the new multithreaded Tokio runtime. Although `h2`
is generic over the runtime, the examples do depend on `tokio`. 

This branch update the example code to use the new `tokio` library
rather than `tokio-core`. It also updates the examples in `RustDoc`.

For the most part, this was pretty trivial --- simply replacing
`handle.spawn(...)` with `tokio::spawn(...)` and `core.run(...)` with
`tokio::run(...)`. There were a couple of cases where error and item
types from spawned futures had to be mapped to `(), ()`. Alternatively,
this could have been avoided by using the single-threaded runtime and
calling `block_on` instead to await the value of those futures, but I
thought it was better to reduce the amount of tokio-specific code in the
examples.

Signed-off-by: Eliza Weisman <eliza@buoyant.io>
2018-09-25 14:33:49 -07:00

71 lines
1.6 KiB
TOML

[package]
name = "h2"
# When releasing to crates.io:
# - Update html_root_url.
# - Update CHANGELOG.md.
# - Create git tag
version = "0.1.12"
license = "MIT"
authors = ["Carl Lerche <me@carllerche.com>"]
description = "An HTTP/2.0 client and server"
documentation = "https://docs.rs/h2"
homepage = "https://github.com/carllerche/h2"
repository = "https://github.com/carllerche/h2"
readme = "README.md"
keywords = ["http", "async", "non-blocking"]
categories = ["asynchronous", "web-programming", "network-programming"]
exclude = ["fixtures/**"]
[badges.travis-ci]
repository = "carllerche/h2"
branch = "master"
[features]
# Enables **unstable** APIs. Any API exposed by this feature has no backwards
# compatibility guarantees. In other words, you should not use this feature for
# anything besides experimentation. Definitely **do not** publish a crate that
# depends on this feature.
unstable = []
[workspace]
members = [
"tests/h2-fuzz",
"tests/h2-tests",
"tests/h2-support",
"util/genfixture",
"util/genhuff",
]
[dependencies]
futures = "0.1"
tokio-io = "0.1.4"
bytes = "0.4.7"
http = "0.1.3"
byteorder = "1.0"
log = "0.4.1"
fnv = "1.0.5"
slab = "0.4.0"
string = "0.1"
indexmap = "1.0"
[dev-dependencies]
# Fuzzing
quickcheck = { version = "0.4.1", default-features = false }
rand = "0.3.15"
# HPACK fixtures
hex = "0.2.0"
walkdir = "1.0.0"
serde = "1.0.0"
serde_json = "1.0.0"
# Akamai example
tokio = "0.1.8"
env_logger = { version = "0.5.3", default-features = false }
rustls = "0.12"
tokio-rustls = "0.5.0"
webpki = "0.18.0-alpha"
webpki-roots = "0.14"