Open-source project
google/comprehensive-rust avatar
google/comprehensive-rust

Comprehensive Rust: Google's Multi-Day Rust Course and How to Build It Locally

This is the Rust course used by the Android team at Google. It provides you the material to quickly teach Rust.

33,374 stars2,072 forksRustApache-2.0

At a glance

What is it?
Comprehensive Rust is the classroom Rust course the Android team uses internally, published as an mdBook with Bazel and xtask tooling. It is built for instructors, not for solo learners, and that shapes everything about it.
Who is it for?
Adopt Comprehensive Rust if you are running an in-person class for engineers who already write C++ or Java and you want a ready-made multi-day syllabus with Android, Chromium, bare-metal and concurrency deep dives. Do not adopt it as your first solo Rust book: the README says the course is less ideal for self-study because you lose the classroom discussion, the questions and the compiler errors triggered live.
Can I use it commercially?
Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 12 days ago.
What is it written in?
Mainly Rust, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 22, 2026, and from our analysis. They are not legal advice.

Editorial analysis

What Comprehensive Rust Is, and Who It Is Actually For

This repository holds the source for a multi-day Rust course developed by the Android team at Google. The README states the course covers everything from basic syntax to generics and error handling, with separate deep dives on Android, Chromium, bare-metal and concurrency. The rendered course lives at google.github.io/comprehensive-rust.

The audience is narrow and stated plainly. The course is used internally at Google to teach Rust to experienced software engineers, typically people with a C++ or Java background. It is taught in a classroom, and the README hopes it will be useful to others who want to teach Rust to their team. That framing matters: this is teaching material for an instructor standing in front of a room, not a reference book you read alone.

The README is unusually candid about the self-study gap. It says the course is less ideal for self-study, because a solo reader misses the classroom discussions, the questions and answers, and the compiler errors the instructor triggers while walking through code samples. Speaker notes and published videos are listed as issues, not as shipped features. If you are looking for a book to work through on a train, the project itself points you elsewhere.

How the Course Is Assembled: mdBook, Bazel and the xtask Wrapper

The course is not a single Markdown file. It is an mdBook project, and the Setup section lists the toolchain: mdbook, mdbook-svgbob for diagrams, mdbook-i18n-helpers and i18n-report for translations, plus two in-repo plugins, mdbook-exerciser and mdbook-course. mdbook-linkcheck2 handles link checking, and Bazel is the build system.

The repository layout confirms this. The workspace Cargo.toml lists members that map onto course chapters: src/borrowing, src/concurrency/sync-exercises, src/control-flow-basics, src/error-handling, src/generics, src/iterators, src/lifetimes, src/memory-management, src/methods-and-traits, src/modules, src/pattern-matching, src/references, src/smart-pointers, src/std-traits, src/std-types, src/testing, src/tuples-and-arrays, src/types-and-values, src/unsafe-rust, src/user-defined-types, and chapter-specific crates such as src/android/testing and src/bare-metal/useful-crates/allocator-example. The xtask crate at the top level is the command wrapper that ties the whole thing together, and there is a po/ directory for the translation catalogs.

That structure has a consequence worth naming. Because exercises are real Cargo workspace members, the snippets are compiled and tested rather than pasted as inert text. The cargo xtask rust-tests command exists precisely to test the included Rust snippets. Translation is handled through gettext catalogs in po/, which is why the build and serve commands accept a language flag.

Installing the Toolchain and Serving the Course on localhost:3000

The README gives an explicit setup path. First install Rust via rustup, then install Bazel through the Bazelisk version manager. After that, clone the repository and run the install command.

shell
git clone https://github.com/google/comprehensive-rust/
cd comprehensive-rust

With the repository cloned, one command installs the correct versions of every tool listed in the Setup section. The README says the binaries land in ~/.cargo/bin afterwards, so that directory needs to be on your PATH.

shell
cargo xtask install-tools

To read the course, start the local web server. The README states the content is served on http://localhost:3000. Running cargo xtask with no arguments lists every available command, which is the fastest way to discover what the wrapper exposes.

shell
cargo xtask serve

If you are teaching a translated class, the serve command takes a language flag. The README gives Danish as the example, using the ISO 639 code after -l or --language.

shell
cargo xtask serve -l da

To produce a static copy instead of a live server, cargo xtask build writes the course into the book/ directory. One caveat is spelled out in the README: exercises must be built and zipped separately and added to book/html. On Windows, symlinks must be enabled with git config --global core.symlinks true and Developer Mode turned on.

The Self-Study Problem Is Real, Not Marketing Modesty

Most course repositories claim to work for everyone. This one does not, and the reasoning is specific. The value of the classroom format, per the README, comes from things that do not survive into a static site: the questions students ask, the answers the instructor gives, and the compiler errors deliberately triggered during live coding. A reader scrolling the HTML gets the code samples but not the failure modes that make them memorable.

The project lists speaker notes and published videos as open issues, which means the gap is acknowledged and unfilled. There is no claim that either has shipped. For an instructor, that is fine, because you supply the missing layer yourself. For a solo learner, it means the course is a syllabus you have to animate on your own, and the parts that teach the most (watching a borrow checker error appear and then resolving it) are exactly the parts you have to reconstruct.

There is a second constraint in the build path. The README notes that cargo xtask build does not bundle exercises; you build and zip them separately and drop them into book/html. Anyone expecting a single reproducible artifact from one command will be surprised. The translation workflow is a third moving part, handled through po/ catalogs and the mdbook-i18n-helpers tooling, with TRANSLATIONS.md holding the fuller instructions.

Comprehensive Rust Against Rustlings and The Rust Programming Language

The two names that come up most when people compare this course are Rustlings and The Rust Programming Language, the official book. They solve different problems.

Rustlings is a set of small exercises you fix until the compiler is satisfied. It is self-paced and self-directed by design. Comprehensive Rust is the inverse: a lecture-shaped sequence with slides, built to be delivered in a room over several days, with the exercises as a supporting layer rather than the main event. If your goal is to grind through borrow checker problems alone at midnight, Rustlings matches that goal and this course does not, by the project's own admission.

The Rust Programming Language is a reference-style book you read linearly and keep on a shelf. Comprehensive Rust is narrower in one sense (it assumes you already program in C++ or Java) and broader in another: it adds dedicated deep dives on Android, Chromium, bare-metal and concurrency that a general book does not carry. The trade-off is that those deep dives assume context a general audience may not have. Pick this course when you have a room, a schedule and an instructor; pick the book when you have neither.

Licence, Maintenance and the Cost of Keeping It Building

The repository is Apache-2.0, and the top-level entries include a second licence file, LICENSE-CC-BY. That split is worth noting: the code and the prose are not necessarily under the same terms, and anyone repackaging the course material should read both files rather than assume the Apache grant covers the text. This is a description of what the repository contains, not legal advice.

The dependency surface is the real maintenance cost. The course depends on mdbook, mdbook-svgbob, mdbook-i18n-helpers, mdbook-exerciser, mdbook-course, mdbook-linkcheck2 and Bazel, and cargo xtask install-tools exists specifically to pin the correct versions of all of them. Two of those plugins live in this repository, which means their compatibility with upstream mdbook is a moving target the maintainers absorb. Translation catalogs in po/ add a second axis: every content change can invalidate strings across every translated language.

On the maintenance question, the repository is not archived, but no last-push date is available in the repository metadata, so I cannot state when it was last updated. Treat the build as something to verify on your own machine rather than something to assume.

Editorial conclusion

Adopt Comprehensive Rust if you are running an in-person class for engineers who already write C++ or Java and you want a ready-made multi-day syllabus with Android, Chromium, bare-metal and concurrency deep dives. Do not adopt it as your first solo Rust book: the README says the course is less ideal for self-study because you lose the classroom discussion, the questions and the compiler errors triggered live. Before committing, verify that the third-party tools listed in the Setup section (mdbook, mdbook-svgbob, mdbook-i18n-helpers, mdbook-exerciser, mdbook-course, mdbook-linkcheck2, Bazel) still install cleanly with cargo xtask install-tools on your platform, and on Windows confirm that symlinks and Developer Mode are enabled first, because the README calls that out as a prerequisite.

Frequently asked questions

How does Comprehensive Rust compare with the Rust book?

Comprehensive Rust is a classroom course developed by Google's Android team for experienced engineers with a C++ or Java background, and the README says it is less ideal for self-study because you miss the classroom discussion and live compiler errors. The Rust Programming Language is a general book you read linearly. The course adds dedicated deep dives on Android, Chromium, bare-metal and concurrency that a general book does not carry.

What are the different types in Rust, and does Comprehensive Rust cover them?

The course covers all aspects of Rust from basic syntax to generics and error handling, according to the README. The workspace Cargo.toml lists dedicated chapter crates for types-and-values, std-types, user-defined-types, generics and lifetimes, so type-related material is organized into separate modules rather than one section.

Is Rust basically C++?

The README does not answer this directly. What it does say is that Comprehensive Rust is aimed at experienced software engineers typically with a background in C++ or Java, which implies the two are treated as different languages that share an audience rather than as equivalents.

Official sources

  1. Official documentation
  2. Official README
  3. Project repository
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/google-comprehensive-rust.svg)](https://hysenlabs.com/projects/google-comprehensive-rust)