2
0
Fork 1
mirror of https://github.com/async-rs/async-std.git synced 2025-07-03 19:41:34 +00:00
async-std/examples/README.md
2019-09-25 20:21:59 -04:00

1.2 KiB

async-std Examples

This directory contains example code that makes use of async-std, each of which can be run from the command line.

Examples

Spawns a task that says hello.

cargo run --example hello-world

Counts the number of lines in a file given as an argument.

cargo run --example line-count -- ./Cargo.toml

Lists files in a directory given as an argument.

cargo run --example list-dir -- .

Prints the runtime's execution log on the standard output.

cargo run --example logging

Prints a file given as an argument to stdout.

cargo run --example print-file ./Cargo.toml