microsoft

RustTraining: Learn Rust Through Structured Training Books

RustTraining is a collection of seven books for learning Rust from different programming backgrounds and at different levels. It covers language fundamentals, async, advanced patterns, type-driven correctness, and production engineering practices.

Stars
14.9k
Forks
1.2k
Stars, last 15 days
+49

Our take

Health score

47/100

How it is scored
Activity
37
Community
63
Issues
53
Pull requests
34

+49 stars in the last 15 days

  • Slower to merge pull requests than 83% of the projects we track

Overview

RustTraining is a curriculum of seven structured books for people learning Rust, whether they are coming from another language or looking to deepen their expertise. It brings together material on core Rust concepts and specialized areas such as async programming, advanced patterns, and engineering practices.

The collection is useful when you want a guided path with explanations and exercises rather than a single reference manual. The books are training material, so consult the official Rust documentation for authoritative language details.

Key Features

  • Offers bridge books for C/C++, C#, and Python programmers.
  • Includes focused material on async Rust, advanced patterns, and type-driven correctness.
  • Covers engineering topics such as cross-compilation, CI/CD, build scripts, and Miri.
  • Provides 15–16 chapters per book, with exercises and Mermaid diagrams.
  • Includes editable Rust Playground examples and full-text search in the rendered books.
  • Supports local builds and previews using mdBook and the repository's cargo xtask commands.

Use Cases

  • A C/C++, C#, or Python developer wants a Rust learning path that relates concepts to their existing background.
  • A Rust learner wants a guided deep dive into async, ownership-related patterns, or type-driven design.
  • An experienced Rust programmer wants to explore unsafe code, allocators, or lock-free structures.
  • A team or instructor wants structured material and exercises for internal Rust training.
  • A contributor wants to build or preview the books locally before proposing documentation changes.

Getting Started

Browse the books at the GitHub Pages site. For a local preview, install Rust and run:

git clone https://github.com/microsoft/RustTraining.git
cd RustTraining
cargo install mdbook mdbook-mermaid
cargo xtask serve

See the README for build, deployment, and contribution details.

Considerations

  • The books are training material, not an authoritative language reference. Verify critical details against the official Rust documentation and the Rust Reference.
  • Local previews require Rust and the mdBook tooling; individual books can also be read online without setting up a build environment.
  • The README describes dual licensing: MIT for the project and CC-BY-4.0 for documentation. Check the repository's license files for the applicable terms.

Found this useful?

Share it with someone who would like RustTraining.

Comparisons