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