Already popular among programmers for its memory safety and speed, the Rust programming language is also valuable for asynchrony. This practical book shows you how asynchronous Rust can help you solve problems that require multitasking. You'll learn how to apply async programming to solve problems with an async approach. You will also dive deeper into async runtimes, implementing your own ways in which async runtimes handle incoming tasks.
Authors Maxwell Flitton and Caroline Morton also show you how to implement the Tokio software library to help you with incoming traffic, communicate between threads with shared memory and channels, and design a range of complex solutions using actors. You'll also learn to perform unit and end-to-end tests on a Rust async system.
With this book, you'll learn
• How Rust approaches async programming
• How coroutines relate to async Rust
• Reactive programming and how to implement pub sub in async rust
• How to solve problems using actors
• How to customize Tokio to gain control over how tasks are processed
• Async Rust design patterns
• How to build an async TCP server just using the standard library
• How to unit test async Rust
By the end of the book, you'll be able to implement your own async TCP server completely from the standard library with zero external dependencies, and unit test your async code.
AI Reading Assistant
Whole-book reading guide from stratified index samples; jump to passages in the text
Tip the Site
Support this siteYour recognition and a small knowledge-service contribution help keep this technical work open source.Scan the WeChat Pay or Alipay code below. Logged-in and guest visitors can both tip.
WeChat Pay
Alipay
Open WeChat or Alipay and scan. No login required.
AI guide
【One-Line Pitch】
A hands-on guide to asynchronous Rust that takes you from the fundamentals of futures and tasks all the way to building your own async runtime, queues, and a dependency-free TCP server. Best for Rust developers who already know the language and want to understand async deeply rather than just use it.
【Book Arc】
- **Opening (~0%–10%)**: Frames what async is and why it matters for I/O-bound work, contrasting blocking vs. asynchronous timelines and situating async within processes, threads, and the OS.
- **Early (~10%–35%)**: Introduces the core machinery of async Rust — tasks, futures, async/await, polling, context, wakers, and pinning — culminating in a worked async audit-logger example.
- **Middle (~35%–50%)**: Consolidates understanding by building custom async queues from scratch, including multiple queues, task routing, task stealing, join macros, and basic runtime configuration.
- **Late (~50%–75%)**: Extends the runtime into networking (executors, connectors, mio, sockets), then explores coroutines and generators, and reactive programming with an event bus.
- **Ending (~75%–100%)**: Moves into customizing Tokio (runtime building, local pools, graceful shutdowns), async design patterns, actors, pub/sub, and unit/end-to-end testing of async systems.
【Key Takeaways】
- **Async is about I/O, not raw speed** (Opening): The book positions async as a tool for multitasking around I/O waits, not a universal performance win — useful for choosing the right concurrency model.
- **Futures require pinning, context, and wakers** (Early): Understanding why futures can't move in memory and how wakers notify executors is the conceptual core that unlocks everything else.
- **Tasks are the unit of async work** (Early): The task-based asynchronous pattern lets you write sequential-looking code that the runtime schedules concurrently.
- **Building your own runtime demystifies the black box** (Middle): Implementing queues, task stealing, and join macros reveals how futures actually flow through an executor, making high-level crates easier to reason about.
- **Coroutines underpin async/await** (Late): The book draws explicit parallels between coroutines and async tasks, showing async functionality can exist without extra threads.
- **Reactive patterns and actors structure complex systems** (Late): Event buses, pub/sub, and actor-based designs are presented as practical ways to organize async communication.
- **Tokio is customizable, not monolithic** (Ending): Runtime building, local pools, and graceful shutdowns give fine-grained control over task processing.
- **Async code must be tested** (Ending): Unit and end-to-end testing of async systems is treated as a first-class skill, not an afterthought.
【Reading Tips】
- Deep-read the futures/pinning/context material in the early chapters — it's the hardest conceptual hurdle and everything later depends on it.
- The networking chapter is flagged by the authors as skippable on a first pass; return to it after the queue-building chapter clicks.
- Treat the queue-building chapter as the pivot point: it converts abstract concepts into something you can inspect and modify.
- Skim the process/thread comparison if you already know OS concurrency; focus on where async sits relative to it.
- Keep the audit-logger and TCP-server examples as reference implementations to adapt for your own projects.
【Coverage Limits】
This guide is based on stratified excerpts covering the preface, table of contents, and early-to-middle chapters; later chapters on Tokio customization, actors, and testing are summarized from the book's stated scope rather than detailed excerpt content.
Page 5
. . . . . . . . . . . . . . . . . . . . . 1 What Is Async? 2 Introduction to Processes 5 What Are Threads? 10 Where Can We Utilize Async? 16 Using Async for...
tes before the next begins. For instance, let’s think about making a cup of coffee and toast, which requires the following steps: 1. Put bread in toaster 2....
t All Together | 45 CHAPTER 3 Building Our Own Async Queues Although we have explored basic async syntax and solved a problem using high-level async concepts...
ent for the order, giving the following function signature: fn spawn_task<F, T>(future: F, order: FutureType) -> Task<T> where F: Future<Output = T> + Send +...
coroutines. Mimicking Async Behavior with Coroutines | 103 Nothing is stopping NestingFuture from having a vector of other futures that update their own valu...
is still blocking. We can make our callbacks nonblocking to the main thread by using an event loop thread that is a constant loop. This loop then accepts inc...
Support this siteYour recognition and a small knowledge-service contribution help keep this technical work open source.
Scan the WeChat Pay or Alipay code below. Logged-in and guest visitors can both tip.
WeChat PayAlipay
Open WeChat or Alipay and scan. No login required.
Add Tag
Enter tag name (max 50 characters)
Share E-Book
Async Rust Unleashing the Power of Fearless Concurrency (Maxwell Flitton, Caroline Morton)(Z-Library)
Scan QR code with your phone to access
Copy the link or scan the QR code to access this e-book on your phone
Share E-Book via Email
Please enter email address
Donation Statistics
¥.00
Total Donations
0
Donation Count
Async Rust Unleashing the Power of Fearless Concurrency (Maxwell Flitton, Caroline Morton)(Z-Library)
Find Your Favorite Books
Only registered users can comment after logging in. Comments need to be reviewed by administrators before being displayed
Loading comments...
Reply to Comment
Edit Comment