Programming Books

9 Best Free Books to Learn about Rust

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

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.

Read the book


2. The Rust Reference by The Rust Project Developers

The Rust ReferenceThis 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.

Read the book


3. Rust by Example by The Rust Community

Rust by Example

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.

Read the book


4. Rust For C++ Programmers by Nick Cameron

Rust For C++ ProgrammersThe 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.

Read the book


5. The Rustonomicon by The Rust Team

The RustonomiconThe 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.

Chapters explore:

  • Meet Safe and Unsafe
  • Data Layout
  • Ownership
  • Type Conversions
  • Uninitialized Memory
  • Ownership Based Resource Management
  • Unwinding
  • Concurrency
  • Implementing Vec

It’s published under the Apache License Version 2.0, as confirmed in the GitHub Code Repository.

Read the book


Next page: Page 2 – Why Rust? and more books

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
AdaALGOL-like programming language, extended from Pascal and other languages
AgdaDependently typed functional language based on intuitionistic Type Theory
ArduinoInexpensive, flexible, open source microcontroller platform
AssemblyAs close to writing machine code without writing in pure hexadecimal
AwkVersatile language designed for pattern scanning and processing language
BashShell and command language; popular both as a shell and a scripting language
BASICBeginner’s All-purpose Symbolic Instruction Code
CGeneral-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
ClojureDialect of the Lisp programming language
ClojureScriptCompiler for Clojure that targets JavaScript
COBOLCommon Business-Oriented Language
CoffeeScriptTranscompiles into JavaScript inspired by Ruby, Python and Haskell
CoqDependently typed language similar to Agda, Idris, F* and others
CrystalGeneral-purpose, concurrent, multi-paradigm, object-oriented language
CSSCSS (Cascading Style Sheets) specifies a web page’s appearance
DGeneral-purpose systems programming language with a C-like syntax
DartClient-optimized language for fast apps on multiple platforms
DylanMulti-paradigm language supporting functional and object-oriented coding
ECMAScriptBest known as the language embedded in web browsers
EiffelObject-oriented language designed by Bertrand Meyer
ElixirRelatively new functional language running on the Erlang virtual machine
ErlangGeneral-purpose, concurrent, declarative, functional language
F#Uses functional, imperative, and object-oriented programming methods
FactorDynamic stack-based programming language
ForthImperative stack-based programming language
FortranThe first high-level language, using the first compiler
GoCompiled, statically typed programming language
GroovyPowerful, optionally typed and dynamic language
HaskellStandardized, general-purpose, polymorphically, statically typed language
HTMLHyperText Markup Language
IconWide variety of features for processing and presenting symbolic data
JArray programming language based primarily on APL
JavaGeneral-purpose, concurrent, class-based, object-oriented, high-level language
JavaScriptInterpreted, prototype-based, scripting language
JuliaHigh-level, high-performance language for technical computing
KotlinMore modern version of Java
LabVIEWDesigned to enable domain experts to build power systems quickly
LaTeXProfessional document preparation system and document markup language
LispUnique features - excellent to study programming constructs
LogoDialect of Lisp that features interactivity, modularity, extensibility
LuaDesigned as an embeddable scripting language
MarkdownPlain text formatting syntax designed to be easy-to-read and easy-to-write
Objective-CObject-oriented language that adds Smalltalk-style messaging to C
OCamlThe main implementation of the Caml language
PascalImperative and procedural language designed in the late 1960s
PerlHigh-level, general-purpose, interpreted, scripting, dynamic language
PHPPHP has been at the helm of the web for many years
PostScriptInterpreted, stack-based and Turing complete language
PrologA general purpose, declarative, logic programming language
PureScriptSmall strongly, statically typed language compiling to JavaScript
PythonGeneral-purpose, structured, powerful language
QMLHierarchical declarative language for user interface layout - JSON-like syntax
RDe facto standard among statisticians and data analysts
RacketGeneral-purpose, object-oriented, multi-paradigm, functional language
RakuMember of the Perl family of programming languages
RubyGeneral purpose, scripting, structured, flexible, fully object-oriented language
RustIdeal for systems, embedded, and other performance critical code
ScalaModern, object-functional, multi-paradigm, Java-based language
SchemeA general-purpose, functional language descended from Lisp and Algol
ScratchVisual programming language designed for 8-16 year-old children
SQLAccess and manipulate data held in a relational database management system
Standard MLGeneral-purpose functional language characterized as "Lisp with types"
SwiftPowerful and intuitive general-purpose programming language
TclDynamic language based on concepts of Lisp, C, and Unix shells
TeXMarkup and programming language - create professional quality typeset text
TypeScriptStrict syntactical superset of JavaScript adding optional static typing
ValaObject-oriented language, syntactically similar to C#
VHDLHardware description language used in electronic design automation
VimLPowerful scripting language of the Vim editor
XMLRules for defining semantic tags describing structure ad meaning
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Please read our Comment FAQ before posting a comment.

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments