Skip to content


Repository files navigation

Hands-On Concurrency with Rust

This is the code repository for Hands-On Concurrency with Rust, published by Packt. It contains all the supporting project files necessary to work through the book from start to finish.

About the Book

Most programming languages can really complicate things, especially with regard to unsafe memory access. The burden on you, the programmer, lies across two domains: understanding the modern machine and your language's pain-points. This book will teach you to how to manage program performance on modern machines and build fast, memory-safe, and concurrent software in Rust. It starts with the fundamentals of Rust and discusses machine architecture concepts. You will be taken through ways to measure and improve the performance of Rust code systematically and how to write collections with confidence. You will learn about the Sync and Send traits applied to threads, and coordinate thread execution with locks, atomic primitives, data-parallelism, and more.

Instructions and Navigation

All of the code is organized into folders. Each folder starts with a number followed by the application name. For example, Chapter02.

All codes are present in theit respective folders.

The code will look like the following:

fn main() {
  println!("Apollo is the name of a space program but also my dog.");

Author's Instruction

Rust Concurrency discusses several community projects. This repository tracks those crates as submodules. To properly initialize this repository please issue the following commands:

> git submodule init
> git submodule update

If you have not yet cloned the repository and have at least git 2.13 you may issue this command instead:

> git clone --recurse-submodules

If this is your first Rust programming book, I warmly thank you for your enthusiasm, but encourage you to seek out a suitable introduction to the programming language. This book will hit the ground running, and it will likely not be appropriate if you've got questions about the basics. The Rust community has produced excellent documentation, including introductory texts. The Book (https:/​/​doc.​rust-​lang.​org/​book/​first-​edition/​), first edition, is how many who are already in the community learned the language. The second edition of the book, still in progress at the time of writing, looks to be an improvement over the original text, and it is also recommended. There are many other excellent introductions widely available for purchase, as well.

Related Products

Download a free PDF

If you have already purchased a print or Kindle version of this book, you can get a DRM-free PDF version at no cost.
Simply click on the link to claim your free PDF.


Hands-On Concurrency with Rust, published by Packt







No releases published


No packages published