The simplest Rust book in the world — and the deepest handbook when you are ready.
The Rust Mastery Handbook is a two-in-one book. Open it at Part 0 and you get Rust in One Hour — eight short, picture-first, analogy-first chapters that teach the eighty percent of Rust a working developer actually uses in a day. Keep reading and the same book becomes a long-form systems handbook covering ownership reasoning, compiler mental models, concurrency, unsafe, and open-source contribution readiness.
No one else on the internet has both in one book. That is the point.
Built with mdBook. Picture-heavy. Playground-linked. Printable as a PDF. Contributor-friendly.
See docs/transformation-plan.md for the multi-session rewrite currently in progress to bring every chapter into the new beginner-first voice.
- Read online: https://lavkushry.github.io/The-Rust-Mastery-Handbook/
- Build locally: Getting Started
- Export PDF: Installation and Troubleshooting
- Contribute: CONTRIBUTING.md, Contribution Ladder, Good First Issues
- You have never touched Rust and you have heard it is hard: Go straight to Part 0 — Rust in One Hour. Sixty minutes of reading. Picture-first. Every code sample runnable in the Rust Playground in one click. When you finish it, you will be able to read almost any Rust code in the wild.
- You know some Rust syntax and you want the real mental model: Skim Part 0 to calibrate, then read Part 2 — Core Rust Foundations and Part 3 — The Heart of Rust. Part 3 is the crown jewel on ownership.
- You are a systems or backend engineer moving into Rust: Start with docs/use-cases.md, skim Part 0 for shared vocabulary, then prioritize Parts 3, 5, 6, and 8 for ownership depth, concurrency, systems topics, and contribution readiness.
- You want to contribute to this handbook: Start with CONTRIBUTING.md, docs/transformation-plan.md, docs/review-checklist.md, and docs/good-first-issues.md.
- The Rust Mastery Handbook
- Start Here
- Choose Your Path
- Table of Contents
- Why This Exists
- Rust Handbook for Systems Engineers
- Who This Project Is For
- Key Features
- How It Works
- Why This Handbook Is Different
- Quick Start (Under 5 Minutes)
- Installation
- Usage
- Project Structure
- Configuration
- Development Workflow
- Testing and Validation
- Publishing and Deployment
- Docs and Support
- Screenshots and Visual Assets
- Contribution Paths
- Roadmap
- Contributing
- Security
- License
- Maintainers
Most Rust books teach the syntax and assume you will absorb the mental model by osmosis. You don't. That is why "Rust is hard" became a reputation.
This book flips that. Part 0 teaches the mental model first — with pictures, analogies, and runnable code — before the syntax has to carry any real weight. By the time you need the syntax, you already know what it is saying. The rest of the book is depth, not difficulty.
The result: a book that is genuinely gentle for a Python or JavaScript developer who has heard Rust is scary, and still rigorous enough for an engineer writing a kernel module three hundred pages later.
Search intent this repository serves well:
- Rust handbook for professional developers
- Rust systems programming learning path
- Rust ownership and lifetimes mental model guide
- Rust architecture and contributor-readiness resource
- Backend and systems engineers moving into Rust
- Developers who already know basic Rust syntax but want deeper mental models
- Readers preparing to contribute to serious Rust projects
- Teams using this handbook as internal upskilling material
- 10-part structured handbook from foundations to advanced systems topics
- 50+ chapters plus appendices and retention drills
- Visual diagrams embedded directly in chapter content
- Printable PDF export in A4 and US Letter formats
- mdBook-based publishing pipeline for GitHub Pages
- Legacy aggregate drafts preserved for editorial history
Source content is authored in Markdown under src, navigation is controlled by src/SUMMARY.md, mdBook builds the static site, and an optional Node-based script exports print-ready PDFs.
High-level flow:
- Write or edit chapter content in src.
- Build and preview with mdBook.
- Optionally export PDFs for publication bundles.
- Push to main to trigger Pages deployment.
- Teaches problem framing and invariants before syntax memorization
- Connects language concepts to real repository navigation and contribution work
- Balances conceptual depth with buildable, maintainable docs workflows
- Treats contributors as long-term collaborators, not drive-by patch submitters
Prerequisites:
- Rust toolchain installed (for cargo)
- mdBook CLI
Commands:
cargo install mdbook --locked
git clone https://github.com/lavkushry/The-Rust-Mastery-Handbook.git
cd The-Rust-Mastery-Handbook
mdbook serve --opencargo install mdbook --lockedgit clone https://github.com/lavkushry/The-Rust-Mastery-Handbook.git
cd The-Rust-Mastery-Handbookmdbook buildmdbook serve --openmdbook buildmdbook build
node scripts/export-pdf.mjsOutput:
- dist/the-rust-mastery-handbook.pdf
mdbook build
node scripts/export-pdf.mjs --all-formatsOutputs:
- dist/the-rust-mastery-handbook-a4.pdf
- dist/the-rust-mastery-handbook-letter.pdf
.
├── book.toml
├── src/
│ ├── SUMMARY.md
│ ├── 00_title_and_toc.md
│ ├── part-01 ... part-10/
│ ├── appendices/
│ └── 10_retention_and_mastery_drills.md
├── scripts/
│ └── export-pdf.mjs
├── styles/
├── theme/
└── archive/legacy-aggregates/
Main config lives in book.toml.
- Book metadata and description
- Build output location
- HTML theme and front-end custom assets
- Repository and edit-link metadata for discoverability
Additional styles and scripts:
- theme/visual-edition.css
- theme/visual-edition.js
- styles/pdf-export.css
Typical authoring loop:
- Edit chapter Markdown in src.
- Run mdbook build to validate structure.
- Preview with mdbook serve.
- Open a focused pull request.
For contribution standards and review flow, see CONTRIBUTING.md.
This project is documentation-first. Validation is currently based on build correctness and rendered output checks.
npm ci
mdbook build
npm testRecommended pre-PR checks:
- Ensure the book builds without errors
- Ensure Node-based script and structure tests pass
- Verify updated pages render correctly in local preview
- Verify links and headings in edited sections
Browser-backed regression tests:
npx playwright install --with-deps chromium
npx playwright testAccessibility scan subset:
npx playwright test tests/e2e/handbook.spec.mjs --grep "axe scan"For repeatable release checks, use docs/jules-regression-playbook.md.
- GitHub Pages deployment is defined in .github/workflows/deploy-pages.yml.
- The site is published from successful main-branch workflow runs.
- Build verification for pull requests is defined in .github/workflows/ci.yml.
- Contributor guide: CONTRIBUTING.md
- Code of conduct: CODE_OF_CONDUCT.md
- Security policy: SECURITY.md
- FAQ: docs/faq.md
- Troubleshooting: docs/troubleshooting.md
- Support policy: docs/support-policy.md
- Versioning policy: docs/versioning-policy.md
- Editorial style guide: docs/editorial-style-guide.md
- Chapter assessment template: docs/chapter-assessment-template.md
- Compiler error playbook: docs/compiler-error-playbook.md
- Rust resource atlas: docs/rust-resource-atlas.md
- Review checklist: docs/review-checklist.md
- Release checklist: docs/release-checklist.md
- World-class 90-day program: docs/world-class-rust-learning-program.md
This project currently uses inline SVG chapter visuals and does not yet include dedicated repository-level screenshot assets or social preview artwork.
See docs/social-preview-spec.md and docs/oss-growth-roadmap.md for concrete asset recommendations.
- Typo, grammar, and clarity fixes in a single chapter
- Internal link and navigation quality improvements
- Diagram accessibility and alt-text improvements
- Build and publishing workflow reliability improvements
- Scoped content expansion proposals with acceptance criteria
Contribution entry points:
Planned OSS-quality and content expansion tasks are tracked in:
Contributions are welcome for:
- Content clarity and accuracy improvements
- Typos, structure, and consistency fixes
- Additional examples and diagrams
- Build and publishing workflow improvements
Start here: CONTRIBUTING.md
Please report vulnerabilities according to SECURITY.md.
The Rust Mastery Handbook is dual-licensed:
- Handbook content, chapters, and inline diagrams in
src/are licensed under CC BY 4.0. - Code snippets, scripts, and build tooling are licensed under MIT.
See the LICENSE file for complete details.
- @lavkushry
For maintainer operations and triage practices, see docs/maintainer-playbook.md.