-
Notifications
You must be signed in to change notification settings - Fork 336
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add cargo commands to the tutorial #565
Add cargo commands to the tutorial #565
Conversation
pull from the original repo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
content/tokio/tutorial/io.md
Outdated
(We won't really try out the server, but feel free to build your own little client using | ||
[tokio::net::TcpStream example](https://docs.rs/tokio/1.4.0/tokio/net/struct.TcpStream.html#examples) | ||
with the proper socket address.) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(We won't really try out the server, but feel free to build your own little client using | |
[tokio::net::TcpStream example](https://docs.rs/tokio/1.4.0/tokio/net/struct.TcpStream.html#examples) | |
with the proper socket address.) | |
You will be able to try the server using a standard command-line tool such as `telnet`, or by writing | |
a simple client like the one found in the documentation for [`tokio::net::TcpStream`][tcp_example]. | |
[tcp_example]: https://docs.rs/tokio/1/tokio/net/struct.TcpStream.html#examples |
content/tokio/tutorial/channels.md
Outdated
mkdir src/bin | ||
mv src/main.rs src/bin/server.rs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You will need to change this to a fenced code block for our CI setup to not consider this as Rust code that it can run.
```text
mkdir src/bin
mv src/main.rs src/bin/server.rs
```
I put backticks but the CI still fails. Can't find the bug :/ oh. Three backticks + |
Looks ready to me. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks.
As discussed in #503 , the tutorial becomes confusing around the Channel section. I have idenitfied it as a lack of instructions on structuring the code.
Following the pattern of instructions of the Spawning page (create an
examples/
directory, renamemain.rs
into it), I have edited the tutorial so it suggests to rename / create binary files in abin
directory:src/bin/server.rs
src/bin/client.rs
src/bin/echo-server-copy.rs
src/bin/echo-server.rs
With all the additional run instructions:
cargo run --bin …
and some verbosity.I believe this will help learners like me who like to type code and tend to be reassured when told where and how.