Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Asynchronous Programming in Rust

You're reading from   Asynchronous Programming in Rust Learn asynchronous programming by building working examples of futures, green threads, and runtimes

Arrow left icon
Product type Paperback
Published in Feb 2024
Publisher Packt
ISBN-13 9781805128137
Length 306 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Carl Fredrik Samson Carl Fredrik Samson
Author Profile Icon Carl Fredrik Samson
Carl Fredrik Samson
Arrow right icon
View More author details
Toc

Table of Contents (16) Chapters Close

Preface 1. Part 1:Asynchronous Programming Fundamentals FREE CHAPTER
2. Chapter 1: Concurrency and Asynchronous Programming: a Detailed Overview 3. Chapter 2: How Programming Languages Model Asynchronous Program Flow 4. Chapter 3: Understanding OS-Backed Event Queues, System Calls, and Cross-Platform Abstractions 5. Part 2:Event Queues and Green Threads
6. Chapter 4: Create Your Own Event Queue 7. Chapter 5: Creating Our Own Fibers 8. Part 3:Futures and async/await in Rust
9. Chapter 6: Futures in Rust 10. Chapter 7: Coroutines and async/await 11. Chapter 8: Runtimes, Wakers, and the Reactor-Executor Pattern 12. Chapter 9: Coroutines, Self-Referential Structs, and Pinning 13. Chapter 10: Creating Your Own Runtime 14. Index 15. Other Books You May Enjoy

To get the most out of this book

You should have some prior programming experience and, preferably, some knowledge about Rust. Reading the free, and excellent, introductory book The Rust Programming Language (https://doc.rust-lang.org/book/) should give you more than enough knowledge about Rust to follow along since any advanced topics will be explained step by step.

The ideal way to read this book is to have the book and a code editor open side by side. You should also have the accompanying repository available so you can refer to that if you encounter any issues.

Software/hardware covered in the book

Operating system requirements

Rust (version 1.51 or later)

Windows, macOS, or Linux

You need Rust installed. If you haven’t already, follow the instructions here: https://www.rust-lang.org/tools/install.

Some examples will require you to use Windows Subsystem for Linux (WSL) on Windows. If you’re following along on a Windows machine, I recommend that you enable WSL (https://learn.microsoft.com/en-us/windows/wsl/install) now and install Rust by following the instructions for installing Rust on WSL here: https://www.rust-lang.org/tools/install.

If you are using the digital version of this book, we advise you to type the code yourself or access the code from the book’s GitHub repository (a link is available in the next section). Doing so will help you avoid any potential errors related to the copying and pasting of code.

The accompanying repository is organized in the following fashion:

  • Code that belongs to a specific chapter is in that chapter’s folder (e.g., ch01).
  • Each example is organized as a separate crate.
  • The letters in front of the example names indicate in what order the different examples are presented in the book. For example, the a-runtime example comes before the b-reactor-executor example. This way, they will be ordered chronologically (at least by default on most systems).
  • Some examples have a version postfixed with -bonus. These versions will be mentioned in the book text and often contain a specific variant of the example that might be interesting to check out but is not important to the topic at hand.
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime