I learn Rust by reading The Rust Programming Language (aka. TRPL) book.
This is my
mind map and collection of resources for learning Rust in early 2019.
I didn't touch Rust up until Nov 2019. I've written a short note about things I read and learned while restarting my Rust learning journey.
My notes while working through TRPL.
Programming paradigm: functional, imperative, structured, generic, concurrent
Rust focus: type and memory safety, precision, concurrency, performance, reliability
Rust enforces memory safety. Compile time memory safety guarantees protects us from:
- Uninitialized variables
- Use-after-free (UAV)
- Exception due to NULL pointers (Rust does not have NULL)
- Impossible to forget to lock the mutex
- Data races between threads
- Mostly no memory leaks
- Iterator invalidation
In the safe subset of Rust, there's no undefined behavior at runtime:
- Integer overflow is defined
- Array access is bounds checked
Rust is modern — built with the experience learned in the past 40 years of programming languages.
Modern language features:
- Enums and pattern matching
- No overhead FFI
- Great compiler errors
- Built-in dependency manager
- Built-in support for testing
- Users forum - official forum
- Internals forum - official forum
- The #beginners channel on Discord
- Get started with Rust - Official learning resources.
- Rust Cookbook - A collection of simple examples that demonstrate good practices to accomplish common programming tasks, using the crates of the Rust ecosystem.
- Rust by Example - A collection of runnable examples that illustrate various Rust concepts and standard libraries.
- Learn Rust With Entirely Too Many Linked Lists
- https://github.com/rust-lang/rustlings - Small exercises to get you used to reading and writing Rust code!
- Tour of Rust - A step by step guide through the features of the Rust programming language.
- A half-hour to learn Rust - 'similar' style to "Learn X in Y Minutes". It covers variable bindings, pattern matching, immutability, references, lifetimes, borrow rules, structs, traits, enums, generics, closures, and more.
- Read Rust: Getting Started - Introductory posts, guides and tutorials for getting started with Rust.
- Learning Rust - Rust programming language tutorials.
- Rust-101 - A tutorial for the Rust language.
- https://github.com/learning-rust/site - Rust Programming Language Tutorials for Everyone!
- Comprehensive Rust 🦀 - This is the Rust course used by the Android team at Google. It provides you the material to quickly teach Rust to everyone. The course covers the full spectrum of Rust, from basic syntax to advanced topics like generics and error handling. It also includes Android-specific content on the last day.
Rust stream on YouTube and/or Twitch:
- Jon Gjengset's stream on Rust - I first discovered Jon's stream while looking at Noria data-flow for high-performance web apps. Jon's stream covers mostly advanced concepts in Rust but not until recently (2020) where he started to covers more "advanced beginners" stuffs.
- Ryan Levick's "advanced beginners" stream on Rust who are familiar with the concepts of ownership, closures and threads but don't yet have a firm grip on them.
- Visualizing memory layout of Rust's data types
- Intorust screencasts by Niko Matsakis.
- Rust for Rustaceans by Jon Gjengset - a book that covers the next steps of Rust after TRPL/"the book". The book is written for people who are already familiar with Rust. The idea is that you read The Rust Programming Language (TRPL) first, play around with Rust for a bit on your own, maybe start using it "for real", and then pick this up to hone your skills. It is fairly fast paced, but is still has a good amount of low level details. (TLDR; if you're comfortable in Rust, this book is the next step up for intermediate developers.)
- Rust in Action by Tim McNamara - Systems programming concepts and techniques.
- Programming Rust by Jim Blandy, Jason Orendorff, Leonora F. S. Tindall - This revised, second edition covers the Rust 2021 Edition. It expands on many concepts in TRPL book. I like that it explains the memory layout of common Rust data structures.
- The Rustonomicon book - Meet Safe and Unsafe.
- Summary of the Rust book
- Zero To Production In Rust - The ideal starting point for your journey as a Rust backend developer. You will learn by doing: you will build a fully functional email newsletter API, starting from scratch.
- Awesome Rust Books - List of Rust books grouped by level.
- Rust for the Polyglot Programmer
Presentations and talks
- Rust: A Language for the Next Forty Years by Carol Nichols - A talk about Rust's safety and stability. And a little bit about railroads.
- Learning systems programming with Rust - Closing keynote at the first RustConf 2016 by Julia Evans.
- Rust container cheat sheet (Google Docs) - Explaining Rust in terms of actual in-memory representations by Raph Levien. Raph think this will be helpful because, most often, these basic Rust types (Vec, Box, Arc) are presented in terms of their abstraction, and the in-memory representation is considered an advanced detail, more a topic for the nomicon. I like it because it clarify things visually.
- Another container cheat sheet [Source]
- A type-based Rust cheatsheet
- See all implementations for Rust and Go side-by-side
- https://github.com/donbright/rust-lang-cheat-sheet - This cheat sheet is in a reasonably useful state for basic things.
Useful libraries. Some created by Rust core members.
Blessed - An unofficial guide to the Rust ecosystem.
Not-Yet-Awesome Rust - A curated list of Rust code and resources that do NOT exist yet, but would be beneficial to the Rust community.
Blogs and articles
Read Rust collects interesting posts related to the Rust programming language.
Note-to-self: I found the writer through Mastodon
- https://github.com/rustasync/areweasyncyet.rs - A website for tracking development progress of
awaitsyntax of Rust programming language in the language itself as well as its ecosystem.
Things I discovered:
- https://github.com/racer-rust/racer - Rust code completion utility.
- explaine.rs - An interactive playground to explore the syntax of the Rust code.
Systems programming with Rust
- Operating Systems (Kernel hacking)
- Create a small operating system in Rust - You can learn Rust by creating a small OS. This is an ongoing blog series. I find this pair well with OS theory from the "Operating Systems: Three Easy Pieces" book (a.k.a. the comet book) and CS-537 class by Remzi. (If anyone have compared xv6 to Blog OS, please let me know.)
- Low-level Programming (core utilities, tools, emulators, embedded programming)
Projects for learning
- Learn embedded Rust by writing a rotary encoders
- Writing an HTTP server in Rust (Part I)
- I made a NES emulator in Rust using generators
- Where to find small Rust TODO's/Projects to hack over weekends?
Users of the Rust programming language: https://communitywiki.org/trunk/grab/Rustaceans
Rust for Python programmer
- Rust for Python Programmers
- Converting a Python library to Rust
- How to make a Python package with compiled Rust (and why you should to increase performance)
Not so useful knowledge.
- Rust history
- Software developer Graydon Hoare created Rust as a personal project while working at Mozilla Research in 2006
- Gradon Hoare's minutes from meetings
- Rust Creator Graydon Hoare Talks About Security, History, and Rust
- I wonder, why Graydon Hoare, the author of Rust, stopped contributing into it and switched to Swift?
- Rust creator Graydon Hoare says current software development practices terrify him
- Rust Core team - Managing the overall direction of Rust, subteam leadership, and any cross-cutting issues
- Rust Compiler team
- Awesome Rust
- rust-learning - A bunch of links to blog posts, articles, videos, etc for learning Rust.
Originally published at GitHub Gist