Last Updated on June 14, 2023
Rust is a systems programming language that runs fast, prevents segmentation faults, and guarantees thread safety. It accomplishes these goals by being memory safe without using garbage collection. The language enables developers to write programs with the performance and control of a low-level language, but with the powerful abstractions of a high-level language.
Rust is ideal for systems, embedded, and other performance critical code.
If you had to describe Rust in just three words, they would be fast, safe, and productive. There’s memory safety without garbage collection, concurrency without data races, abstraction without overhead, and stability without stagnation.
Rust is designed by Mozilla.
In this article, I recommend 10 (was 8) books to get you up to speed with Rust. There’s introductory texts, books that dig deeper into the language, as well as other texts that will help you migrate from C++ and Ruby to Rust.
1. The Rust Programming Language by Steve Klabnik & Carol Nichols
The Rust Programming Language teaches you how to program in Rust. It’s a comprehensive resource for all topics related to Rust, and is the primary official document of the language.
It comes with our highest recommendation as an introductory text to Rust, but you’ll need some knowledge of programming.
The book starts with a quick hands-on project to introduce the basics then explores key concepts in depth, such as ownership, the type system, error handling, and fearless concurrency. Later chapters cover detailed explanations of Rust-oriented perspectives on topics like pattern matching, iterators, and smart pointers, with concrete examples and exercises. Move from theory to practice.
The book is licensed under the Apache License, Version 2.0 or the MIT license, at your option.
There are paperback and Kindle editions available for purchase. And the GitHub Code Repository lives at https://github.com/rust-lang/book.
2. The Rust Reference by The Rust Project Developers
This book is the other main primary reference for the Rust programming language.
This book does not serve as an introduction to the language. Background familiarity with the language is assumed. You should read The Rust Programming Language book first, and then tackle the material in The Rust Reference.
This book offers:
- Chapters that informally describe each language construct and their use.
- Chapters that informally describe the memory model, concurrency model, runtime services, linkage model, and debugging facilities.
- Appendix chapters providing rationale and references to languages that influenced the design.
There’s a GitHub Code Repository at https://github.com/rust-lang/reference.
The book is open source, published under the Apache License Version 2.0.
3. Rust by Example by The Rust Community
Rust by Example (RBE) is a collection of runnable examples that illustrate various Rust concepts and standard libraries.
There are translations available for Chinese, French, and Japanese. The book is licensed under Apache License Version 2.0 or MIT license at your option.
There’s also a GitHub Code Repository at https://github.com/rust-lang/rust-by-example.
4. Rust For C++ Programmers by Nick Cameron
The intended audience of this book is C++ programmers who want to learn Rust.
This tutorial is intended for programmers who already know how pointers and references work and are used to systems programming concepts such as integer widths and memory management.
The author primarily covers the differences between Rust and C++ to get you writing Rust programs quickly without lots of material you probably already know.
There’s a GitHub Code Repository at https://github.com/nrc/r4cppp.
5. The Rustonomicon by The Rust Team
The Rustonomicon – The Dark Arts of Advanced and Unsafe Rust Programming digs into all the awful details that you need to understand when writing Unsafe Rust programs.
This is not an introductory text. You’ll need general systems programming and Rust knowledge before you embark on this book.
The authors devote considerable coverage regarding the different kinds of safety and guarantees that programs care about.
- Meet Safe and Unsafe
- Data Layout
- Type Conversions
- Uninitialized Memory
- Ownership Based Resource Management
- Implementing Vec
It’s published under the Apache License Version 2.0, as confirmed in the GitHub Code Repository.
Pages in this article:
Page 1 – The Rust Programming Language and more books
Page 2 – Why Rust? and more books
All books in this series:
|Free Programming Books
|ALGOL-like programming language, extended from Pascal and other languages
|Dependently typed functional language based on intuitionistic Type Theory
|Inexpensive, flexible, open source microcontroller platform
|As close to writing machine code without writing in pure hexadecimal
|Versatile language designed for pattern scanning and processing language
|Shell and command language; popular both as a shell and a scripting language
|Beginner’s All-purpose Symbolic Instruction Code
|General-purpose, procedural, portable, high-level language
|General-purpose, portable, free-form, multi-paradigm language
|Combines the power and flexibility of C++ with the simplicity of Visual Basic
|Dialect of the Lisp programming language
|Common Business-Oriented Language
|Dependently typed language similar to Agda, Idris, F* and others
|General-purpose, concurrent, multi-paradigm, object-oriented language
|CSS (Cascading Style Sheets) specifies a web page’s appearance
|General-purpose systems programming language with a C-like syntax
|Client-optimized language for fast apps on multiple platforms
|Multi-paradigm language supporting functional and object-oriented coding
|Best known as the language embedded in web browsers
|Object-oriented language designed by Bertrand Meyer
|Relatively new functional language running on the Erlang virtual machine
|General-purpose, concurrent, declarative, functional language
|Uses functional, imperative, and object-oriented programming methods
|Dynamic stack-based programming language
|Imperative stack-based programming language
|The first high-level language, using the first compiler
|Compiled, statically typed programming language
|Powerful, optionally typed and dynamic language
|Standardized, general-purpose, polymorphically, statically typed language
|HyperText Markup Language
|Wide variety of features for processing and presenting symbolic data
|Array programming language based primarily on APL
|General-purpose, concurrent, class-based, object-oriented, high-level language
|Interpreted, prototype-based, scripting language
|High-level, high-performance language for technical computing
|More modern version of Java
|Designed to enable domain experts to build power systems quickly
|Professional document preparation system and document markup language
|Unique features - excellent to study programming constructs
|Dialect of Lisp that features interactivity, modularity, extensibility
|Designed as an embeddable scripting language
|Plain text formatting syntax designed to be easy-to-read and easy-to-write
|Object-oriented language that adds Smalltalk-style messaging to C
|The main implementation of the Caml language
|Imperative and procedural language designed in the late 1960s
|High-level, general-purpose, interpreted, scripting, dynamic language
|PHP has been at the helm of the web for many years
|Interpreted, stack-based and Turing complete language
|A general purpose, declarative, logic programming language
|General-purpose, structured, powerful language
|Hierarchical declarative language for user interface layout - JSON-like syntax
|De facto standard among statisticians and data analysts
|General-purpose, object-oriented, multi-paradigm, functional language
|Member of the Perl family of programming languages
|General purpose, scripting, structured, flexible, fully object-oriented language
|Ideal for systems, embedded, and other performance critical code
|Modern, object-functional, multi-paradigm, Java-based language
|A general-purpose, functional language descended from Lisp and Algol
|Visual programming language designed for 8-16 year-old children
|Access and manipulate data held in a relational database management system
|General-purpose functional language characterized as "Lisp with types"
|Powerful and intuitive general-purpose programming language
|Dynamic language based on concepts of Lisp, C, and Unix shells
|Markup and programming language - create professional quality typeset text
|Object-oriented language, syntactically similar to C#
|Hardware description language used in electronic design automation
|Powerful scripting language of the Vim editor
|Rules for defining semantic tags describing structure ad meaning