u/idevthereforeiamin r/rust • Recommends
On “A Rust controller for Kubernetes”
111K subscribers • 38 videos on Hallway
Advanced. Deep dive for people who know the field.
120K views7 years ago7 recommendations
Programming languagesSystems programmingRustConcurrency and parallelismNetworking and protocols
Jon Gjengset explains the inner workings of Rust's futures, pinning, and the async/await state machine.
Futures are Rust's way of expressing asynchronous computations, but even after reading the documentation, it can be hard to figure out how all the pieces of futures (and tokio) fit together. While this may not matter too much if you're just *using* futures, it becomes a stumbling block once you want to implement asynchronous primitives yourself. The highly anticipated async and await keywords that are coming down the pike promise to greatly reduce the friction of writing and using asynchronous code, but add even more to the mystery of how this stuff all works. NOTE: The YouTube transcoding process seems to have introduce audio lag on all the non-1080p versions. I'll report it to YT, but if it's bothering you, the 1080p version works fine :) In this stream, we tackle all of this head on. We go through what futures are, how they work, how they are used to represent things like asynchronous I/O (like networking), how they are executed, and how they are evolving as they are being adopted into the standard library. We also discuss async/await, and how they affect futures, and how Rust's proposed pinning types act as the glue to make async/await work. This is pretty dense material, but hopefully serves as a good and thorough overview of futures in Rust. If you want to know how it all works, this stream probably has you covered! To help you navigate, here are the major transition points: - Introduction - What are futures? - How are futures executed? - Super weird audio problems - All good again! (you didn't miss anything) - How do you integrate futures with I/O? - Driving futures with Tokio - Multi-threaded future execution - Stream and Sink - (brief aside about tokio-io-pool) - Putting futures in the standard library - Arbitrary self types - What is async/await? - Why is async/await hard? - Self-referential data-types - Pinning! - Q&A The tokio documentation push is being organized at github.com/tokio-rs/doc-push. You can vote for the next stream topic at jon.thesquareplanet.com/live-coding/ ! Live version with chat history here: youtu.be/fYE4qm6rbLEWhat people say. Highly recommended as an exceptionally deep and clear explanation of Rust's async ecosystem, futures, and pinning.
u/idevthereforeiamin r/rust • Recommends
On “A Rust controller for Kubernetes”
u/barskernin r/rust • Recommends
On “Trouble Understanding the Futures ecosystem”
u/barskernin r/rust • Recommends
On “std::future::Future stabilized (in 1.36)!”
u/riasthebestgirlin r/rust • Recommends
On “Async Rust book - Why does the Future need to be boxed and pinned here?”
u/JonhooRust for Rustaceansin r/rust • Recommends
On “Uncovered Intermediate Topics”
u/kimsnjin r/rust • Recommends
On “How to learn about Rust's async story ? (and async in general)”
u/pkunk11in r/rust • Recommends
On “Anything like write your own tokio/async-std?”
u/slikrick_in r/rust • Recommends
On “The What and How of Futures and async/await in Rust”
u/riasthebestgirlin r/rust • Mentions
On “Announcing Rust 1.64.0”
u/IAm_A_Complete_Idiotin r/rust • Mentions
On “How to understand Rust Pin and where I should use it?”
u/1vaderin r/rust • Mentions
On “Looking for resources to get better and learn the advanced stuff”
u/cfsamsonin r/rust • Mentions
On “Async Rust Primer?”
u/lanklaasin r/rust • Mentions
On “With async/await, I don't get what runs the await task/future since there is no runtime or executor by default in Rust?”
u/maboesanmanin r/rust • Mentions
On “What is tokio exactly?”
u/kruvasyanin r/rust • Mentions
On “what are some good resources to learn about Futures in depth?”
u/Limp-Sherbetin r/rust • Mentions
On “Is my code garbage?(Struggled 8 hours in one sitting with trial and error)”