Skip to content

sujayakar/futures-tutorial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Prerequisites

  • futures-rs version 0.1.17
  • rustc 2018-04-29 nightly

Familiarity with some advanced Rust concepts will be helpful too.

  • Iterators: They're often pretty similar to futures in implementation
  • Borrow checker: Moving into closures and lifetimes
  • Traits, associated types, trait objects, and impl Trait

The Rust book 2.0 is a good resource.

Also, watch Alex Crichton's talk from 2016 on the high-level idea for futures. It's still very current.

Format

Inside src/bin there's exercise files exercise1.rs, exercise2.rs, and so on. Each has instructions at the top with suggested code to read under src/ and functions to complete inline. If you ever get stuck, there's always a correponding solutions?.rs file in the same directory.

Recall that you can run a binary directly with cargo:

$ cargo run --release --bin exercise1 -- <args>

TODO

  • Exercise 4: Building a semaphore with "shared memory"
  • Exercise 5: Map async/await to combinators
  • Exercise 6: Implement explicit and_then state machine
  • Exercise 7: Implement oneshot with task wakeups
  • Performance tuning with Cyclotron
  • Write high level goals here

Appendix

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages