2019-07-08 13:34:39 -07:00
|
|
|
## Examples of how to use Tokio
|
|
|
|
|
|
2020-01-08 00:55:10 +01:00
|
|
|
This directory contains a number of examples showcasing various capabilities of
|
|
|
|
|
the `tokio` crate.
|
|
|
|
|
|
|
|
|
|
All examples can be executed with:
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
cargo run --example $name
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
A good starting point for the examples would be [`hello_world`](hello_world.rs)
|
2025-04-18 10:32:25 -04:00
|
|
|
and [`echo-tcp`](echo-tcp.rs). Additionally [the tokio website][tokioweb] contains
|
2020-01-08 00:55:10 +01:00
|
|
|
additional guides for some of the examples.
|
|
|
|
|
|
2020-04-15 15:30:03 -07:00
|
|
|
For a larger "real world" example, see the [`mini-redis`][redis] repository.
|
|
|
|
|
|
2020-01-08 00:55:10 +01:00
|
|
|
If you've got an example you'd like to see here, please feel free to open an
|
|
|
|
|
issue. Otherwise if you've got an example you'd like to add, please feel free
|
|
|
|
|
to make a PR!
|
|
|
|
|
|
2020-07-23 05:35:02 +02:00
|
|
|
[tokioweb]: https://tokio.rs/tokio/tutorial
|
2020-04-15 15:30:03 -07:00
|
|
|
[redis]: https://github.com/tokio-rs/mini-redis
|