RustTraining README

The project's README from github.com/microsoft/RustTraining. As one markdown file: README.md.

License This project is dual-licensed under the MIT License and Creative Commons Attribution 4.0 International (CC-BY-4.0).

Trademarks This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.

Rust Training Books

Seven training courses covering Rust from different programming backgrounds, plus deep-dives on async, advanced patterns, and engineering practices.

This material combines original content with ideas and examples inspired by some of the best resources in the Rust ecosystem. The goal is to present an in-depth, technically accurate curriculum that weaves together knowledge scattered across books, blogs, conference talks, and video series into a cohesive, pedagogically structured experience.

Disclaimer: These books are training material, not an authoritative reference. While we strive for accuracy, always verify critical details against the official Rust documentation and the Rust Reference.

Inspirations & Acknowledgments

📖 Start Reading

Pick the book that matches your background. Books are grouped by complexity so you can chart a learning path:

Level Description
🟢 Bridge Learn Rust coming from another language — start here
🔵 Deep Dive Focused exploration of a major Rust subsystem
🟡 Advanced Patterns and techniques for experienced Rustaceans
🟣 Expert Cutting-edge type-level and correctness techniques
🟤 Practices Engineering, tooling, and production readiness
Book Level Who it's for
Rust for C/C++ Programmers 🟢 Bridge Move semantics, RAII, FFI, embedded, no_std
Rust for C# Programmers 🟢 Bridge Swift / C# / Java → ownership & type system
Rust for Python Programmers 🟢 Bridge Dynamic → static typing, GIL-free concurrency
Async Rust 🔵 Deep Dive Tokio, streams, cancellation safety
Rust Patterns 🟡 Advanced Pin, allocators, lock-free structures, unsafe
Type-Driven Correctness 🟣 Expert Type-state, phantom types, capability tokens
Rust Engineering Practices 🟤 Practices Build scripts, cross-compilation, CI/CD, Miri

Each book has 15–16 chapters with Mermaid diagrams, editable Rust playgrounds, exercises, and full-text search.

Tip: Browse the rendered books with sidebar navigation and search at the GitHub Pages site.

Local preview: For offline reading or while contributing (install Rust first):

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

🔧 For Maintainers

Building, serving, and editing the books locally

Prerequisites

Install Rust via rustup if you haven't already, then:

cargo install [email protected] [email protected]

Clone the repo

git clone https://github.com/microsoft/RustTraining.git
cd RustTraining

Build & serve

cargo xtask build               # Build all books into site/ (local preview)
cargo xtask serve               # Build and serve at http://localhost:3000
cargo xtask deploy              # Build all books into docs/ (for GitHub Pages)
cargo xtask clean               # Remove site/ and docs/

To build or serve a single book:

cd c-cpp-book && mdbook serve --open    # http://localhost:3000

Deployment

The site auto-deploys to GitHub Pages on push to main via .github/workflows/pages.yml. No manual steps needed.

RustTraining (microsoft/RustTraining)

Searching Database…

What is this?Seven free Rust training books from Microsoft that take you from another programming language up to async, advanced patterns, and engineering practices.
Is it one big course or separate books?Seven separate books grouped into complexity tiers: green Bridge for learning Rust from another language, blue Deep Dives, yellow Advanced, purple Expert, and brown Practices.
Where do I start?Pick the book that matches your background — the Bridge tier is marked as the starting point. The rendered books with sidebar navigation and search live on the GitHub Pages site.
Can I treat these books as the authoritative Rust reference?No — the authors warn it is training material, not an authoritative reference, and critical details should be checked against the official Rust documentation and the Rust Reference.
Do I need to already know how to program?You should already program in another language: the Bridge books target C/C++, C# (plus Java or Swift), and Python developers. There is no from-scratch track for total beginners.
Can I read them offline, or is it web-only?Reading on the GitHub Pages site needs nothing but a browser; for offline reading or contributing, install Rust via rustup, clone the repo, and build or serve a single book locally.
How is the material licensed — can I reuse it in my own courses?Dual-licensed under MIT and Creative Commons Attribution 4.0 (CC-BY-4.0), so reuse is fine with attribution; Microsoft trademark guidelines still apply to logos.
What is inside each book?Each book runs 15-16 chapters with Mermaid diagrams, editable Rust playgrounds, exercises, and full-text search; the hosted version adds sidebar navigation.
What do the deeper books cover once I am past the basics?Async Rust (Tokio, streams, cancellation safety), Rust Patterns (Pin, allocators, lock-free structures, unsafe), Type-Driven Correctness (type-state, phantom types, capability tokens), and Engineering Practices (build scripts, cross-compilation, CI/CD, Miri).
Is the material original or compiled from other sources?It combines original content with ideas and examples inspired by well-known Rust resources — The Rust Programming Language, Jon Gjengset's deep-dives, Mara Bos' Rust Atomics and Locks, Rust by Example and more — restructured into one pedagogical curriculum.
Is the site updated automatically?Yes — the site auto-deploys to GitHub Pages on every push to main with no manual steps, and the repo is brand new, created in March 2026.
Creator
microsoft
Size
1.6 MB
Stars
14.9K
Updated
CommitSep 11
Age
7mo
Commits · 90 Days