New Rust course by Android: Comprehensive Rust 🦀

Hi all, I would like to share what I've been working on for the last few months at work: a new beginner-friendly Rust course called Comprehensive Rust :crab:. You can find the source here: GitHub - google/comprehensive-rust.

I work on Android and we've supported Rust for OS level development for a couple of years now. To help accelerate the adoption of Rust in Android, we've written a four day course which aims to get developers started with Rust. We start with basic syntax, borrowing, ownership, and move up to advanced topics such as generics, traits and error handling. We even touch upon unsafe Rust and we also have a chapter with Android-specific information. We don't cover everything, though: I hope to cover async Rust soon, and we also need more material about interior mutability. Please use the issue tracker or the GitHub discussions to let me know about other missing topics — I'm sure there are lots of stuff we could cover :slight_smile:

The course is ready to use for anyone: I've been teaching classes internally and we've also run classes with other instructors. If you're already proficient in Rust, it should be possible for you to pick up the course material and teach a class as your company. If you do, please let me know how it goes!


If I find time I'll review it. Would you want feedback here or as an issue or multiple issues?


Thanks, that would be awesome! Feedback would be best on the issue tracker so that I and the team can all follow along.

I've already gotten a bunch of PRs for typos, bad grammar, and some factual mistakes... I'm sure there is plenty more to fix :slight_smile:

1 Like

Just a really minor bit of nitpicking feedback: try to prefer "shared mutability" rather than "interior mutability," at least w.r.t. the Rust concept. "Interior mutability" is better for things which use mutation as an implementation detail within an immutable/shared interface; "shared mutability" is a much better description of how e.g. atomics work. Mutating atomics isn't very internal.

Right, would that be types like Cell and RefCell in your opinion? Those are the types which the course doesn't really cover yet.

By the way, I hope this is a good place for me to say Thank You to the people who wrote the software we use in the course and who wrote documentation for Rust:

  • mdbook: The course is built with mdbook and I'm grateful to @ehuss for reviewing a small fix in preparation for the launch of the course. I'll be sending more PRs your way in the next months.

  • The Rust Playground: the course uses it extensively via the embedded code snippets. Thanks to @shepmaster and the other mainainers for keeping it running. It is an essential part of the interactive experience of the course.

  • The Rust book: This served as a strong inspiration. We try to cover a majority of the material in the book. Thank you @steveklabnik and @carols10cents for writing it.

  • Rust by Example: The format of the course is very similar to this excellent resource. I just made the pages shorter so they can be used in a classroom setting. Thanks in particular to the people working on the destructuring examples.

  • Rust on Exercism: I copied an exercise from this excellent Rust course. Thanks @seanchen1991 for the health statistics exercise.

  • CXX: Instead of writing about Rust and C++ interoperability, I simply open the excellent tutorial in the class. Thanks @dtolnay for writing it.


I made a bunch of issues; sorry if it was spammy.

Nope, not spammy at all! I'm particularly impressed by issues like Suggestion: Globals and state since it's not just a surface-level change. So thank you very much for putting those thoughts into words.

I'll try to see how we can incorporate those ideas into the course in the new year.

Just to follow up here: I've added support for translations to the course.

Feel free to jump in! :smile: The translation infrastructure is generic and can be used with other mdbook projects as well.

I've also written a tiny script which let's you run an entire mdbook through Google Translate automatically. The result should be proofread by someone before being put to use, but it can serve as a quick starting point.


Thanks to our incredible volunteer translators, the course is now published in three languages :partying_face::

There are several other translations in the pipeline and you're welcome to come and help out!

The course has around 1,300 pieces of translatable text, so there is enough for everybody :sweat_smile: We use a Gettext based workflow so that we can keep things updated as the English source text changes.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.