async-std/examples
2019-09-24 17:42:18 -04:00
..
a-chat Fix compilation errors on latest nightly 2019-09-11 17:17:20 +02:00
hello-world.rs remove async_await feature gate 2019-08-21 00:29:35 -07:00
line-count.rs remove async_await feature gate 2019-08-21 00:29:35 -07:00
list-dir.rs Clean up the fs module and a few other places 2019-09-14 01:24:31 +02:00
logging.rs remove async_await feature gate 2019-08-21 00:29:35 -07:00
print-file.rs More robust file implementation 2019-09-07 23:17:20 +02:00
README.md add inline example 2019-09-24 17:42:18 -04:00
socket-timeouts.rs Fix compilation errors on latest nightly 2019-09-11 17:17:20 +02:00
stdin-echo.rs remove async_await feature gate 2019-08-21 00:29:35 -07:00
stdin-timeout.rs remove async_await feature gate 2019-08-21 00:29:35 -07:00
surf-web.rs remove async_await feature gate 2019-08-21 00:29:35 -07:00
task-local.rs remove async_await feature gate 2019-08-21 00:29:35 -07:00
task-name.rs remove async_await feature gate 2019-08-21 00:29:35 -07:00
tcp-client.rs remove async_await feature gate 2019-08-21 00:29:35 -07:00
tcp-echo.rs remove async_await feature gate 2019-08-21 00:29:35 -07:00
udp-client.rs remove async_await feature gate 2019-08-21 00:29:35 -07:00
udp-echo.rs remove async_await feature gate 2019-08-21 00:29:35 -07:00

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 can be run by running the following:

cargo run --example hello-world

Spawns a task that says hello.

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.