By Sebastien La Duca, re-founder of the CMU Blockchain Group

Most of the time, language doesn't matter much for software engineers, because the most commonly-used languages - Python, Javascript, and C/C++ - have relatively low learning overhead. But Rust has a pretty steep learning curve.

However, once engineers get over the learning curve, Rust enables you to be massively productive. Its tooling, ability to abstract things, garbage-collector-less memory management, concurrency primitives, and more make it a highly productive language for writing screaming-fast and secure programs, which is why blockchain companies love it.

To help you get over the learning curve, I thought I'd share a rough roadmap and list of resources for learning it since a lot of people here have mentioned that they're interested and/or already learning it. Note that I'm not saying you have to learn rust this way, nor am I claiming this is the best way - this is merely a suggestion, and ultimately you can do stuff however you want. In any case, this is a skill, not knowledge - therefore practice (i.e. building stuff) is necessary for learning it*.*

If you're unfamiliar with rust or you're considering if you want to learn rust in the first place, check out this talk by Jon Gjengset, who is mentioned below. This is a great way to motivate a lot of the things rust does that may seem quite annoying at first.

https://youtu.be/DnT-LUQgc7s

Beginners (Totally new to the language):

  1. "The Book" - a totally free and open-source, fully-fledged conceptual explanation of the hows and why's of rust's features, including a few well-chosen projects. It's best to pair this with something more hands-on like the next two resources or working on a project. You'll constantly be referring back to this like a "rust bible", even once you're very good at it.

  2. Tour of Rust - a step-by-step, hands-on introduction to rust. Great if you're the kind of person who prefers to get their hands dirty right off the bat and gain a deeper understanding of the concepts later.

  3. Rustlings - similar to Tour of Rust, but more immersive and you can do it on your own machine and also covers the build/test tooling and project setup

  4. Write small things in rust, like common data structures or small systems (binary trees, a simple CLI tool, maybe a merkle tree or a bitcoin miner, something else that's fun and small) or do "leetcode" problems. I used to do codesignal in rust to practice my "leetcode brain" and improve my rust skills at the same time (though oftentimes in practice you'll want to do those in python, so this may not be the best idea). At CMU, there are many courses where they let you use any programming language for assignments, and some of our club members have learned a lot from using rust for those classes - other universities might be similar in some respects.

Novices (basic understanding of ownership, written a few small programs, likely still fighting with the borrow checker and diving deeper into some of rust's features):

  1. Rust By Example - an excellent quick-reference for when you're not sure of the syntax for something or you're trying to express something and you're not quite sure how.

  2. 24 Days of Rust - A hands-on survey of 24 awesome rust libraries and projects that introduces various language features by seeing them in action. Some of these blew my mind the first time I saw them. Each is a mini-tutorial that dives into building something small. Great for getting used to cargo's dependency management, and each day will probably expose you to one of rust's more advanced feature. You should actually do the tutorials.

  3. Three resources on how to effectively use traits - oftentimes novice rustaceans will try to use traits to implement object-oriented patterns they're probably used to writing in other programming languages. Unfortunately in rust (and arguably in general), OOP is an OOF because the relationship between data and computation doesn't mix well with ownership and leads to very slow and/or hard to maintain rust code. Using traits effectively is probably one of the single most important things standing in the way between a rust novice and a productive rustacean, so I've grouped together three resources here for learning how not to OOF with OOP in rust:

Intermediate and Up

There unfortunately aren't many well-structured resources for intermediate rustaceans. There are however a lot of pretty good ones on specific topics. But in the end, the only way to get really good at using programming language, like any tool, is to use it to build stuff. And while theres some good content here to help develop deeper understanding of how to use stuff, and why some things are designed the way they are, the best thing to do is to work on a project.

  1. Jon Gjengset's youtube channel - Jon is a researcher at MIT focused on distributed operating systems, who streams himself coding and explains all kinds of stuff. Some of the more advanced rust concepts and features are hard to use once they are understood, and his streams are great at developing an intuiting for when to use each concept and how best to use them. He's a bit long-winded (most of the videos are quite long), but he's very thorough and his streams personally helped me a lot.

  2. The Talk You've been .await-ing for - A talk by Steve Klabnik about rust's new asynchronous programming features - namely the Future construct (similar to a promise), Executors, and Reactors, which are pretty hard to get your head around at first but are common in all code that involves sending stuff over the internet like a web server, REST API, client library, or a distributed system like a blockchain. If you're planning on doing protocol dev in rust, this is absolutely necessary. Jon Gjengset has a video that probably does a better job of explaining it, but it's ~3 hours long, so IMHO this one is better.

  3. Blogs from core contributors - A lot of rust's core contributers write blogs with content that is really good at illustrating how to approach problems within a rust-mindset and how to design simple, elegant, and easy-to-use abstractions. This is great reading for advanced rustaceans who want to really push the envelope of what's possible with rust. There are many, but here are two big ones: