Skip to content

Commit 0897b91

Browse files
Merge pull request #804 from async-rs/tokio02-feature
2 parents 6ca7b09 + 0df3c02 commit 0897b91

File tree

3 files changed

+22
-1
lines changed

3 files changed

+22
-1
lines changed

Diff for: .github/workflows/ci.yml

+11
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,17 @@ jobs:
110110
command: check
111111
args: --no-default-features --features alloc --target thumbv7m-none-eabi -Z avoid-dev-deps
112112

113+
check_tokio_02_feature:
114+
name: Check tokio02 feature
115+
runs-on: ubuntu-latest
116+
steps:
117+
- uses: actions/checkout@master
118+
- name: check tokio02
119+
uses: actions-rs/cargo@v1
120+
with:
121+
command: check
122+
args: --all --features tokio02
123+
113124
cross:
114125
name: Cross compile
115126
runs-on: ubuntu-latest

Diff for: Cargo.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ alloc = [
5151
"futures-core/alloc",
5252
"pin-project-lite",
5353
]
54+
tokio02 = ["smol/tokio02"]
5455

5556
[dependencies]
5657
async-attributes = { version = "1.1.1", optional = true }
@@ -98,4 +99,4 @@ required-features = ["unstable"]
9899

99100
[[example]]
100101
name = "surf-web"
101-
required-features = ["surf"]
102+
required-features = ["surf"]

Diff for: src/lib.rs

+9
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,15 @@
214214
//! features = ["attributes"]
215215
//! ```
216216
//!
217+
//! Compatibility with the `tokio` runtime is possible using the `tokio02`
218+
//! Cargo feature:
219+
//!
220+
//! ```toml
221+
//! [dependencies.async-std]
222+
//! version = "1.6.0"
223+
//! features = ["tokio02"]
224+
//! ```
225+
//!
217226
//! Additionally it's possible to only use the core traits and combinators by
218227
//! only enabling the `std` Cargo feature:
219228
//!

0 commit comments

Comments
 (0)