O'Reilly logo

Mastering Rust by Vesa Kaihlavirta

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Summary

Rust can easily give you safe and efficient concurrent programming with a rather minimal (although not zero) runtime cost. The safety comes from a combination of the language's memory safety trio (ownership, borrowing, and lifetimes) and the standard library that builds upon those. 

During this chapter, you learned to launch threads with the standard Rust library and how Copy and move types work in the context of parallelism. We covered channels, the atomic reference counting type Arc, and how to use Arc with mutexes.

In the next few chapters, we'll dive into metaprogramming, starting with macros.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required