Skip to content

Commit a381e9a

Browse files
committed
Document how to do cargo add for different environments
1 parent d386311 commit a381e9a

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

README.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,21 @@
77

88
`asyncs` is a shim like package to ship async runtime agnostic facilities.
99

10-
## Usage
11-
```
12-
[dependencies]
13-
asyncs = "0.1.0"
10+
## Usages
1411

15-
[dev-dependencies]
16-
asyncs = { version = "0.1.0", features = ["test"] }
17-
```
12+
* `cargo add asyncs` for libraries.
13+
* `cargo add --dev --features test asyncs` for tests.
14+
* `cargo add --features tokio,smol,async-global-executor` for binaries to compat with existing async runtimes. See [spawns][] for more.
1815

1916
Feature `test` should only be enabled for `dev-dependencies`.
2017

2118
## Provides
22-
* `asyncs::task::spawn` to spawn tasks in runtime agnostic way from [spawns](https://docs.rs/spawns).
23-
* `select!` to multiplex asynchronous futures simultaneously from [async-select](https://docs.rs/async-select).
19+
* `asyncs::task::spawn` to spawn tasks in runtime agnostic way from [spawns][].
20+
* `select!` to multiplex asynchronous futures simultaneously from [async-select][].
2421
* `#[asyncs::test]` to bootstrap a runtime for testing. This is only available with feature `test`.
2522

2623
## Does not provide
27-
Executors.
24+
Executors and `#[asyncs::main]`.
25+
26+
[spawns]: https://docs.rs/spawns
27+
[async-select]: https://docs.rs/async-select

0 commit comments

Comments
 (0)