You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
async-std/examples/README.md

32 lines
804 B
Markdown

# `async-std` Examples
This directory contains example code that makes use of `async-std`.
Each example can be run from the command line.
For example, [Hello World][hello-world] can be run by running the following:
```
cargo run --example hello-world
```
- [Hello World][hello-world]
Spawns a task that says hello.
- [Line Count][line-count]
Counts the number of lines in a file given as an argument.
```shell
cargo run --example line-count -- ./Cargo.toml
```
- [List Dir][list-dir]
Lists files in a directory given as an argument.
[hello-world]: https://github.com/async-rs/async-std/blob/master/examples/hello-world.rs
[line-count]: https://github.com/async-rs/async-std/blob/master/examples/line-count.rs
[list-dir]: https://github.com/async-rs/async-std/blob/master/examples/list-dir.rs