The following pages cover how the course was built and why the exercises are arranged this way.
You've made it to the end (or you're just skipping ahead, which is fine too). With the core exercises behind you, allow me to share a bit of context about this course and how to keep going.
There's no shortage of Rust resources.
The official book is excellent, and you should read it. So is Rust by Example, and plenty of others.
Some resources require setup before you can run the examples. You might have to set up a project, install the Rust toolchain, or figure out how to run tests. What was missing, for me, was a URL I could just open in a browser and write code immediately. And you'd get instant feedback on how you're doing.
This course started as a folder on my laptop, the kind of thing I'd pull out during workshops whenever someone asked "how do I do this in Rust?" Over the years, I collected enough material for a structured path through the language. This course is the result.
My hope is that it gives you a complementary perspective on Rust, from a practitioner's perspective. Let me know how I did.
If you haven't done the bonus exercises, please do. They are more free-form and loose than the strict core exercises, and they are a great way to expand your skills as you come up with your own challenges.
I recommend Build a password validator as a starting point.
In general, practice the Rust core mechanics on a problem that matters to you. Some recommendations:
corrode is a Rust training and consulting company. I help people go from prototype to production. If your company is looking to migrate to Rust, give me a call and let's see if I can help. Go to corrode.dev/services to learn more.
This course is open source. You can find the source code at github.com/corrode/course. Issues and pull requests are highly appreciated.
Welcome to the Rust community.
I built this course around a simple bet: Rust sinks in faster when you write code before you study every rule. The choices below follow from that bet.
| Teaching choice | This course |
|---|---|
| When to write code | You write code from the first exercise |
| When to explain ownership | Ownership introduced as a spiral, consolidated late |
| How to introduce a topic | Problem-first: show the bug Rust prevents, then the fix |
| How to check your work | Tests and focused todo!() stubs that point at what's missing |
Here you try the code before reading the rules behind it. I use that order because a borrow-checker error gives you something concrete to work through instead of a rule to memorize.
I haven't built all the ideas below, but I don't want to lose them:
Fn, FnMut, FnOnce, and capture semantics)
as another turn of the ownership spiral.If you have opinions on any of these, the issue tracker is open.
Extra practice to explore at your own pace. These chapters do not count toward course progress.