The following resources can help you build intuition and understanding, at least they did for me. I found them to be so interesting that I made a note of them and several years later I'm still thinking about and revisiting most of these resources.
Last updated 2022-11-09.
The first thing you need to do is to read The Book. Maybe you read it cover-to-cover, maybe you jump around. Whatever works best for you.
Error Handling in a Correctness-Critical Rust Project Intimidating title, but should be quite approachable after reading The Book
Books — I really think reading a physical book can help with focus, and I recommend the following books (I only recommend books I have read or own myself):
- Rust in Action for an introduction to systems programming.
- Programming Rust, 2nd Edition for a comprehensive alternative to The Book.
- Hands-on Rust A fun and to-the-point book about 2D game programming.
I wasn't sure if I should put Interior Mutabilty Patterns
in the beginner or Intermediate section, but here it is. It goes through a
number of examples of how to change a
struct without it being
Weird and upsetting.
Common Rust Lifetime Misconceptions teaches lifetimes, but also contains a lot of wisdom around generic types and how they relate to references of those types. Read it when you feel comfortable with references and generics in Rust.
& references are called shared references, and
&mut references are
called exclusive references.
Actors with Tokio goes through the motions of setting up Actors, as well as some pitfalls to avoid.
Patterns Are Not Expressions — the title says it all really, but you'll have to read it to really get it. I can't explain it with just a paragraph.
Rust snags a list of gotchas that you may run into when your code gets sufficiently advanced.
A tour of dyn Trait guides you through the nature
dyn Trait and all the corner cases.
A look back at asynchronous Rust
is kind of a weird document to include, because it mainly focuses on the
shortcomings of some async patterns. It taught me some stuff I had never seen
before (how to use
select! properly), as well as what to watch out for
(watch out for unwittingly cancelled
- Rust for Rustaceans A nice book for Intermediate Rust programmers. Not many code examples, but rather discussions and explanations of concepts and details.
- Rust Atomics and Locks will teach you about memory ordering, happens-before relationships, how to keep data safe between threads using atomics, and more. This could also have ended up in the advanced category because atomics is something you'll reach for very late in your programming journey. The book itself is very approachable and recommended to anyone. I wrote a blog post about the book too.
This is where the fun stuff starts happening. Even if I know I won't be doing much of this stuff, it's very interesting and exciting.
The Rustnomicon is a book that you need
to study to understand
Zero Sized References is an intriguing look into how to manage resource in memory-constrained environments such as embedded systems by relying on Zero Sized Types (ZST) which only exist at compile time.
Inviting God's Wrath with Cursed Rust guides
us through optimizations to
std::borrow::Cow<T> by reducing the amount of memory
I highly recommend looking through Rust Language Cheat Sheet.
These are mostly links to URLO (users.rust-lang.org), which contain (mostly interesting) questions, but the answers are where the real magic is. You'll see the same names and avatars answering many of these, and if you have any questions you want an answer to, there is a good chance that the answer can be found on URLO. If you can't find the answer to your question there... Just ask, everyone is helpful and friendly.
Here are some questions & answers I have bookmarked because they're quite eye-opening the first time you read them.
- What is the meaning of for<’a>
- Function parameter:
v: &mut Tor
&mut v: T
- Problems with Attempts at Type Erasure using Boxes
- How to become a Rust ninja?
- What’s your recommended path to wrap your head around the entirety of Rust’s capabilities?
- What does this “*” do in rust
- This Week in Rust: Blog - Mastodon
- Gankra: Blog - Mastodon.
- Mara Bos: Blog - Mastodon
- Yoshua Wuyts - Blog - Mastodon
- Nick Cameron: Blog - Mastodon
- Nicholas Nethercote: Blog - Mastodon
- Niko Matsakis: Blog
- Alice Ryhl: Blog
- Fasterthanlime: Blog - Mastodon
- Llogiq: Blog
- matklad: Blog
- Pascal (killercup): Blog - Mastodon
- Ralf Jung: Blog
- Raph Levien: Blog - Mastodon
- It's all about the bit: Blog
- mcyoung: Blog
- TROUBLES.MD: Blog
- Ferrous Systems: Blog
- Rustacean Station Interviews and "What's new in Rust".
- New Rustacean Great podcast for learning Rust, as opposed to the other podcasts where you learn about Rust. (Completed. No new content)
- Oxide and Friends Rust adjacent content - very interesting.
- Rust Game Dev Interviews and content for Rust game development.
- Chats with James Interviews.
- Building with Rust Interviews.
- Are we podcast yet? Interviews.
- Request For Explanation (Completed. No new content)
- The Yak Shave (Completed. No new content)