Skip to content

redixhumayun/async-rust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Understanding Async Rust

This is an educational project built to understand async runtimes in Rust

It contains 3 separate runtimes, each of which is slightly more complex than the last:

  1. The first is a very simple runtime which shows an executor which polls futures to completion.
  2. The second is an event loop combined with a reactor.
  3. The third is a simple scheduler combined with a reactor, which can be used to poll futures to completion.

To run any runtime, simply go into the folder for the runtime and just do cargo build followed by cargo run. Repos 2 & 3 will start up a TCP server to which you can then send requests.

There is a test client application located in the folders for 2 & 3 used to simulate network requests. You can run rustc ./src/async_runtime/test_client.rs and this will produce a binary called test_client in the root directory. Once you have the server running, do ./test_client in a separate tab to send some requests.

There are 3 accompanying blog posts - one for each section

  1. https://redixhumayun.github.io/async/2024/08/05/async-runtimes.html
  2. https://redixhumayun.github.io/async/2024/09/18/async-runtimes-part-ii.html
  3. https://redixhumayun.github.io/async/2024/10/10/async-runtimes-part-iii.html

Have fun :)

References

There are a number of useful references that I found while attempting to build this out

  1. This playlist by nyxtom on YouTube
  2. The repo for the playlist above
  3. Async Rust Book
  4. Asynchronous Programming In Rust

I've linked far more references in the blog posts above but the references here proved to be the most helpful to me

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published