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|
|Ada||ALGOL-like programming language, extended from Pascal and other languages|
|Agda||Dependently typed functional language based on intuitionistic Type Theory|
|Arduino||Inexpensive, flexible, open source microcontroller platform|
|Assembly||As close to writing machine code without writing in pure hexadecimal|
|Awk||Versatile language designed for pattern scanning and processing language|
|Bash||Shell and command language; popular both as a shell and a scripting language|
|BASIC||Beginner’s All-purpose Symbolic Instruction Code|
|C||General-purpose, procedural, portable, high-level language|
|C++||General-purpose, portable, free-form, multi-paradigm language|
|C#||Combines the power and flexibility of C++ with the simplicity of Visual Basic|
|Clojure||Dialect of the Lisp programming language|
|COBOL||Common Business-Oriented Language|
|Coq||Dependently typed language similar to Agda, Idris, F* and others|
|Crystal||General-purpose, concurrent, multi-paradigm, object-oriented language|
|CSS||CSS (Cascading Style Sheets) specifies a web page’s appearance|
|D||General-purpose systems programming language with a C-like syntax|
|Dart||Client-optimized language for fast apps on multiple platforms|
|Dylan||Multi-paradigm language supporting functional and object-oriented coding|
|ECMAScript||Best known as the language embedded in web browsers|
|Eiffel||Object-oriented language designed by Bertrand Meyer|
|Elixir||Relatively new functional language running on the Erlang virtual machine|
|Erlang||General-purpose, concurrent, declarative, functional language|
|F#||Uses functional, imperative, and object-oriented programming methods|
|Factor||Dynamic stack-based programming language|
|Forth||Imperative stack-based programming language|
|Fortran||The first high-level language, using the first compiler|
|Go||Compiled, statically typed programming language|
|Groovy||Powerful, optionally typed and dynamic language|
|Haskell||Standardized, general-purpose, polymorphically, statically typed language|
|HTML||HyperText Markup Language|
|Icon||Wide variety of features for processing and presenting symbolic data|
|J||Array programming language based primarily on APL|
|Java||General-purpose, concurrent, class-based, object-oriented, high-level language|
|Julia||High-level, high-performance language for technical computing|
|Kotlin||More modern version of Java|
|LabVIEW||Designed to enable domain experts to build power systems quickly|
|LaTeX||Professional document preparation system and document markup language|
|Lisp||Unique features - excellent to study programming constructs|
|Logo||Dialect of Lisp that features interactivity, modularity, extensibility|
|Lua||Designed as an embeddable scripting language|
|Markdown||Plain text formatting syntax designed to be easy-to-read and easy-to-write|
|Objective-C||Object-oriented language that adds Smalltalk-style messaging to C|
|OCaml||The main implementation of the Caml language|
|Pascal||Imperative and procedural language designed in the late 1960s|
|Perl||High-level, general-purpose, interpreted, scripting, dynamic language|
|PHP||PHP has been at the helm of the web for many years|
|PostScript||Interpreted, stack-based and Turing complete language|
|Prolog||A general purpose, declarative, logic programming language|
|Python||General-purpose, structured, powerful language|
|QML||Hierarchical declarative language for user interface layout - JSON-like syntax|
|R||De facto standard among statisticians and data analysts|
|Racket||General-purpose, object-oriented, multi-paradigm, functional language|
|Raku||Member of the Perl family of programming languages|
|Ruby||General purpose, scripting, structured, flexible, fully object-oriented language|
|Rust||Ideal for systems, embedded, and other performance critical code|
|Scala||Modern, object-functional, multi-paradigm, Java-based language|
|Scheme||A general-purpose, functional language descended from Lisp and Algol|
|Scratch||Visual programming language designed for 8-16 year-old children|
|SQL||Access and manipulate data held in a relational database management system|
|Standard ML||General-purpose functional language characterized as "Lisp with types"|
|Swift||Powerful and intuitive general-purpose programming language|
|Tcl||Dynamic language based on concepts of Lisp, C, and Unix shells|
|TeX||Markup and programming language - create professional quality typeset text|
|Vala||Object-oriented language, syntactically similar to C#|
|VHDL||Hardware description language used in electronic design automation|
|VimL||Powerful scripting language of the Vim editor|
|XML||Rules for defining semantic tags describing structure ad meaning|