async-await: move examples into dedicated crate (#608)

This works around a bug in the cargo renaming feature as well as allows
the use of `[patch]` in the `Cargo.toml`.
This commit is contained in:
Carl Lerche
2018-09-06 13:36:59 -04:00
committed by Toby Lawrence
parent 6828870608
commit 16664189c1
8 changed files with 49 additions and 0 deletions
+12
View File
@@ -24,6 +24,18 @@ matrix:
- env: TARGET=i686-unknown-freebsd
- env: TARGET=i686-unknown-linux-gnu
# Test the async / await preview. We don't want to block PRs on this failing
# though.
- rust: nightly
env: ALLOW_FAILURES=true
script: |
cd tokio-async-await
cargo check --all
allow_failures:
- rust: nightly
env: ALLOW_FAILURES=true
script:
- |
set -e
+4
View File
@@ -18,6 +18,10 @@ Experimental async/await support for Tokio
categories = ["asynchronous"]
[workspace]
members = [
"./",
"examples",
]
[lib]
name = "tokio"
+28
View File
@@ -0,0 +1,28 @@
cargo-features = ["edition"]
[package]
name = "examples"
edition = "2018"
# When releasing to crates.io:
# - Update html_root_url.
version = "0.1.1"
authors = ["Carl Lerche <[email protected]>"]
license = "MIT"
[[bin]]
name = "hyper"
path = "src/hyper.rs"
[dependencies]
tokio-async-await = { version = "0.1.0", path = "../" }
bytes = "0.4.9"
hyper = "0.12.8"
[patch.crates-io]
tokio = { path = "../.." }
tokio-executor = { path = "../../tokio-executor" }
tokio-io = { path = "../../tokio-io" }
tokio-reactor = { path = "../../tokio-reactor" }
tokio-tcp = { path = "../../tokio-tcp" }
tokio-timer = { path = "../../tokio-timer" }
+5
View File
@@ -0,0 +1,5 @@
# Tokio async/await examples
These are a separate crate in order to work around some cargo bugs. It also
allows `[patch]` to be used in `Cargo.toml` to ensure the correct lib versions
are being pulled in.