Concurrency you can reason about
Async Rust is easy to start and hard to finish. The syntax is a day's work; the rest is knowing who owns your state, what happens when a future is dropped halfway through, and what your server does when it is asked for more than it can deliver. This workshop is about the rest.
You will work through a series of test-driven exercises, turning minidb, a small embedded key-value
store, into a networked one: concurrent, cancellable, back-pressured, shut down cleanly, and durable
across a restart. Everything runs on Tokio.
This workshop is designed for people who are comfortable with Rust and want to stop guessing when it comes to async.
Note
This workshop has been written by Mainmatter.
It's one of the trainings in our portfolio of Rust workshops.
Check out our landing page if you're looking for Rust consulting or training!
Open the companion book for this course in your browser. Follow the instructions there to get started.
- Rust (follow instructions here).
If Rust is already installed on your system, make sure you are running on the latest compiler version (cargo --version).
If not, update usingrustup update(or another appropriate command depending on how you installed Rust on your system). - (Optional) An IDE with Rust autocompletion support.
We recommend one of the following:
- RustRover;
- Visual Studio Code with the
rust-analyzerextension.
You can find the solutions to the exercises in the solutions branch of this repository.
Throughout the workshop, the following resources might turn out to be useful:
- Tokio documentation and the Tokio tutorial
- Asynchronous Programming in Rust
- Rust documentation (you can also open the documentation offline with
rustup doc!) - Alice Ryhl on actors with Tokio
Copyright © 2026- Mainmatter GmbH (https://mainmatter.com), released under the Creative Commons Attribution-NonCommercial 4.0 International license.