Index of Free Online Rust Books

A curated list of free online books about Rust, organized by category.

Starter Books for Beginners

  • The Rust Programming Language : Start your Rust journey with the book.
  • Free Rust course developed by the Android team at Google: The course is used internally at Google when teaching Rust to experienced software engineers. They typically have a background in C++ or Java. The course covers all aspects of Rust, from basic syntax to generics and error handling. It also includes deep dives on Android, Chromium, bare-metal, and concurrency.
  • Yet Another Rust Resource (YARR!) : Software engineers who know how to program in a high-level language but aren’t familiar with lower-level programming and want to learn to write Rust quickly
  • The Rust Book (Abridged) : condensed version of “The Rust Programming Language”. If you’re already familiar with one or more other programming languages, then you are likely already familiar with a lot of the concepts the book covers, and you might benefit from this shorter version.
  • Rust 101 : A guide to aid you in your journey of becoming a Rustacean (Rust developer).
  • Rust for C#/.NET Developers : a (non-comprehensive) guide for C# and .NET developers that are completely new to the Rust.

Exercises To Learn Rust

  • 100 Exercises To Learn Rust : This course will teach you Rust’s core concepts, one exercise at a time. You’ll learn about Rust’s syntax, its type system, its standard library, and its ecosystem.
  • Rust By Example : Learn Rust with examples (Live code editor included)
  • Rust By Practice : This book was designed for easily diving into and getting skilled with Rust, and it’s very easy to use: All you need to do is to make each exercise compile without ERRORS and Panics !

Concurrency

  • Rust Atomics and Locks : Provides an excellent overview of low-level concurrency
  • async-book : Asynchronous Programming in Rust
  • Async programming in Rust with async-std : This book serves as high-level documentation for async-std and a way of learning async programming in Rust through it. As such, it focuses on the async-std API and the task model it gives you.

CLI

Macros

  • The Little Book of Rust Macros : This book is an attempt to distill the Rust community’s collective knowledge of Rust macros, the Macros by Example ones as well as procedural macros(WIP).
  • MacroKata : a set of exercises which you can use to learn how to write macros in Rust. When completing each task

FFI

  • Safe interop between Rust and C++ : CXX is a library provides a safe mechanism for calling C++ code from Rust and Rust code from C++.
  • The (unofficial) Rust FFI Guide : Doing more in-depth FFI tasks than simply calling one or two functions from a C library. This guide is centred around the idea of building a REST client using Qt (C++) for the GUI and reqwest (Rust) for the business logic.

Embedded

  • The Embedded Rust Book : An introductory book about using the Rust Programming Language on “Bare Metal” embedded systems, such as Microcontrollers.
  • Discovery - Microbit : This book is an introductory course on microcontroller-based embedded systems that uses Rust as the teaching language rather than the usual C/C++. Uses Microbit board (v1 and v2)
  • Discovery - STM32F3DISCOVERY : This book is an introductory course on microcontroller-based embedded systems that uses Rust as the teaching language rather than the usual C/C++. Uses STM32F3DISCOVERY board.
  • The Rust on ESP Book : This book aims to provide a comprehensive guide on using the Rust programming language with Espressif SoCs and modules.
  • Embedded Rust on Espressif : This repository contains Training Material for learning to use Embedded Rust with the Espressif ESP32-C3.
  • Embedded Rust (no_std) on Espressif : Getting-started guide on using the Rust with Espressif SoCs using no_std.
  • Workbook for Embedded Workshops : It uses both the nRF52840 Development Kit (DK) and the nRF52840 Dongle. It mainly develop programs for the DK and use the Dongle to assist with some exercises.

Kernel Development

Linux Development

  • Building eBPF Programs with Aya : This getting started guide will help you use the Rust Programming Language and Aya library to build extended Berkley Packet Filter (eBPF) programs.

WASM

  • The Rust and WebAssembly Book : This book is for anyone interested in compiling Rust to WebAssembly for fast, reliable code on the Web
  • Chip-8 Book: Introductory tutorial for how to develop your first Chip-8 emulator, targeting both desktop computers and web browsers via WebAssembly.

Compiler Development

Network Programming

Unsafe Rust

  • The Rustonomicon: The book digs into all the awful details that you need to understand when writing Unsafe Rust programs.
  • Learn Rust the Dangerous Way : A series of articles putting Rust features in context for low-level C programmers who maybe don’t have a formal CS background — the sort of people who work on firmware, game engines, OS kernels, and the like.

DSA and Design Patterns

  • DSA Book : A book about Rust Data Structures and Algorithms.
  • Rust Design Patterns : A catalogue of Rust design patterns, anti-patterns and idioms

Machine Learning

General

  • Effective Rust : 35 Specific Ways to Improve Your Rust Code. This practical guide helps you make the transition to writing idiomatic Rust—while also making full use of Rust’s type system, safety guarantees, and burgeoning ecosystem.
  • Learning Rust With Entirely Too Many Linked Lists : Teach you basic and advanced Rust programming entirely by having you implement 6 linked lists
  • Rust Cookbook : This Rust Cookbook is a collection of simple examples that demonstrate good practices to accomplish common programming tasks, using the crates of the Rust ecosystem.
  • High Assurance Rust: Developing Secure and Robust Software : This book teaches you how to build reliable and secure software using Rust through hands-on projects.
  • The Rust Unstable Book
  • Rust Fuzz Book: Fuzz testing is a software testing technique used to find security and stability issues by providing pseudo-random data as input to the software.