Skip to content
Domain Specific Language

Rust resources

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.

Beginner content

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

Beginner books

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):

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 mutable. Weird and upsetting.

Intermediate content

"Crate dtolnay" — First you need to know what a "dtolnay" is. It's a person. A person that is extremely prolific and is the author of a host of very popular crates such as serde, async_trait, and many more. The linked "crate" contains a number of documents, of which _02__reference_types is the most interesting for an beginner/intermediate. I highly recommend it.

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.

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 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 Futures!).

Intermediate books

  • Rust for Rustaceans A nice book for Intermediate Rust programmers. Not many code examples, but rather discussions and explanations of concepts and details.

Advanced content

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 unsafe Rust.

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 used.

Uncategorized

I highly recommend looking through Rust Language Cheat Sheet.

Q&A

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.

Blogs

Videos

Podcasts