mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-09-09 00:00:08 +02:00
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:
committed by
Toby Lawrence
parent
6828870608
commit
16664189c1
+12
@@ -24,6 +24,18 @@ matrix:
|
|||||||
- env: TARGET=i686-unknown-freebsd
|
- env: TARGET=i686-unknown-freebsd
|
||||||
- env: TARGET=i686-unknown-linux-gnu
|
- 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:
|
script:
|
||||||
- |
|
- |
|
||||||
set -e
|
set -e
|
||||||
|
|||||||
@@ -18,6 +18,10 @@ Experimental async/await support for Tokio
|
|||||||
categories = ["asynchronous"]
|
categories = ["asynchronous"]
|
||||||
|
|
||||||
[workspace]
|
[workspace]
|
||||||
|
members = [
|
||||||
|
"./",
|
||||||
|
"examples",
|
||||||
|
]
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
name = "tokio"
|
name = "tokio"
|
||||||
|
|||||||
@@ -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" }
|
||||||
@@ -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.
|
||||||
Reference in New Issue
Block a user