-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Restructure documentation from the ground up #13
Comments
Here is my current (rough) outline for docs:
|
Re: Async / await, I strongly feel that the documentation should be built off stable Rust by default. Examples can have both stable & async / await versions and docs can reference / explain async / await & link to external resources on it, but the flow should not be based on it until it hits stable. |
It should also be plausible to work on the docs incrementally vs. a long lived branch. |
Take this with a grain of salt since I haven't had an opportunity to use tokio (or any other Rust code) for any serious projects, but I did experience some confusion back when I read the tokio docs "cover to cover". I believe that was primarily because of the counterintuitiveness of the poll method/the Future trait, but also partially because a large portion of it simply wasn't useful information for writing high-level applications. Some concrete suggestions:
Everything else I can think of (e.g., more examples!) is already in the OP post. |
I know you have already noted this above, but yes, could you please strive towards more real world examples? Such as:
|
Some notes from a chat earlier today: We'll probably want an FAQ or otherwise style page about maintaining state with futures. Right now most futures are Today you need to restort to using |
something I just stumbled upon, it would be nice to have an example where you pass down a |
I struggled a lot while learning
point 6, 7 are not in terms of giving It's not much, but I hope my input help grow |
Thanks @0freeman00! I'm working actively on a small book for async programming in Rust, and have already taken into account many of the suggestions you present. Talking specifically about the C10K problem (or similar), though, in an interesting twist; I'll give it some thought. |
@aturon waiting for the book to come out then. :) |
Just saw a great source of inspiration for "advanced user"/"reference" documentation passing by in TWIR: https://cafbit.com/post/tokio_internals/ . |
@aturon do you have any updates on the book? |
There has been miscommunication and @aturon has not been planning on writing this book as documentation, so this is still an open issue. |
An extremely early version is up here, but it's based on a bunch of changes to the relevant crates that have since seen further iteration. I've been holding off further work on it until the dust settles a bit on the design. |
One of the most frequent pieces of feedback we get about futures and Tokio in Rust is "it's confusing!" While https://tokio.rs has some great content it doesn't seem to have stood well against the test of time. It's time we rewrite/restructure our documentation from the ground up. I hope to use this issue to track this work and provide a location to discuss it as well!
@aturon and I talked a bit today about how to start structuring docs, and we came initially to some high-level conclusions:
Other than that, here's the thinking for an outline so far:
Compare and contrast sync and async
Behind the curtain: Futures
fn poll
onlyI/O with futures
There's definitely quite a bit to fill out here! We'll try to do that over time.
The text was updated successfully, but these errors were encountered: