Programming · Advanced

Rust

Memory safety without a garbage collector — and the borrow checker that makes people either love it or quit.

Lessons
16 lessons
Total runtime
26 hours of video
Modules
5 modules
Optional lessons
13 optional
Start course

Free. No account.

About this course

Rust makes an unusual promise: the performance of C, without the entire category of bugs that C is famous for. No null dereferences, no use-after-free, no data races — not caught at runtime, but rejected at compile time. It delivers on this, and the price is a compiler that will refuse to build your program for reasons that feel personal for the first fortnight.

That fortnight is the whole difficulty of the language. Ownership, borrowing and lifetimes are one idea seen from three angles, and until it clicks you will fight the compiler constantly. After it clicks you mostly stop thinking about it, and start noticing that the errors it was rejecting were real.

So this course front-loads the concepts rather than the syntax. Fireship's two minutes frame why the language exists, the No Boilerplate video makes the argument for taking the pain seriously, and freeCodeCamp's tutorial is the spine that gets you writing code. Everything after that is a pool rather than a queue: an ownership module that explains the same idea four times over from four teachers, because it is the one concept where a second explanation is usually what does it; a module on the everyday machinery of traits, generics and Result; and a set of projects for when you want to stop being taught.

The required path is under two hours. Taking the optional lessons as well puts it past twenty-five, most of that being freeCodeCamp's fourteen-hour course for people who would rather have one long treatment than six short ones. Expect to be slower than you are used to. Rust is one of the few languages where being unable to compile something is usually the compiler being right.

What you'll be able to do

  • Explain ownership, borrowing and lifetimes, and predict what the borrow checker will reject
  • Use Result and Option instead of exceptions and null
  • Work with structs, enums and pattern matching idiomatically
  • Manage a project with Cargo and pull in crates
  • Say honestly when Rust is the right tool and when it is an expensive habit

Curriculum

16 lessons · 26 hours

Why Rust Exists

2 lessons · 10m

  1. 01CompletedRust in 100 SecondsFireshipVideoThe problem Rust is solving, stated in two minutes. Memory safety without a garbage collector is a genuinely novel combination, and it is worth understanding why before you meet the cost.2m
  2. 02CompletedRust: Your code can be PERFECTNo BoilerplateVideoThe argument for why the compiler fighting you is a feature. Useful to watch before the long course, because it reframes the frustration ahead as the thing you came for.8m

The Language

2 lessons · 15h 25m

  1. 03CompletedRust Programming Course for BeginnersfreeCodeCamp.orgVideoThe whole language, patiently. Long, and the ownership and borrowing sections are worth rewatching rather than pushing through — everything later in the course assumes they landed.1h 26m
  2. 04CompletedLearn Rust Programming — Complete CourseOptionalfreeCodeCamp.orgVideoFourteen hours, and the most thorough free Rust course there is. An alternative to the whole rest of this page rather than an addition to it — take it if you would rather have one teacher for the entire language than a different one per topic.13h 59m

Ownership, Borrowing and Lifetimes

4 lessons · 3h 4m

  1. 05CompletedUnderstanding Ownership in RustOptionalLet's Get RustyVideoThe one idea the whole language is built on, taught slowly and with the borrow checker's actual error messages on screen. If you only watch one thing in this module, watch this.26m
  2. 06CompletedRust Ownership and BorrowingOptionalDoug MilfordVideoThe same ground at a slower pace and in more detail. Ownership is the concept most people need explained twice — this is the second explanation, and it is worth taking if the first one left edges.38m
  3. 07CompletedRust LifetimesOptionalDoug MilfordVideoLifetimes get skimmed by most beginner courses and then start appearing in error messages anyway. This is the missing half-hour that makes those messages readable.27m
  4. 08CompletedCrust of Rust — Lifetime AnnotationsOptionalJon GjengsetVideoLive coding at a genuinely advanced level, building a real type and hitting real lifetime problems on the way. Come back to this after you have written some Rust of your own — it is wasted early and excellent later.1h 33m

Everyday Rust

4 lessons · 1h 34m

  1. 09CompletedTraits in RustOptionalLet's Get RustyVideoRust has no inheritance, and traits are what it has instead. Twelve minutes that explain most of what looks strange about the standard library.12m
  2. 10CompletedSimple Error Handling in RustOptionalLet's Get RustyVideoResult, Option and the question-mark operator, which is how essentially all real Rust code deals with failure. Learn this early or you will write unwrap() everywhere and regret it.24m
  3. 11CompletedGenerics, Traits and LifetimesOptionalThe Dev MethodVideoThe three features taken together, which is how they actually appear in signatures. Useful once each one individually makes sense and the combination still does not.36m
  4. 12CompletedAll Rust Features ExplainedOptionalLet's Get RustyVideoA fast tour of everything the language has. Best used as a checklist near the end — anything here you cannot describe is a gap worth filling.22m

Building Something

4 lessons · 5h 49m

  1. 13CompletedRust Crash CourseOptionalTraversy MediaVideoA practical pass through the language aimed at people who already program. Good as a bridge between being taught Rust and writing it.1h 51m
  2. 14CompletedBuild a Rust Desktop AppOptionalTravis MediaVideoA small finished thing you can actually run and show someone. Half an hour, and the first point where Rust stops being an exercise.27m
  3. 15CompletedBuild an HTTP Server in Rust from ScratchOptionalcorrodeVideoNo framework, no shortcuts — sockets, parsing and error handling done by hand. This is where ownership stops being a lecture topic and starts being a design decision you have to make.2h 47m
  4. 16CompletedBuild a Full Stack Chatbot in RustOptionalCode to the MoonVideoRust on both ends, front and back, using Leptos. Worth it mainly to see that the language is a plausible choice for web work and not only for systems code.44m

Credits

Every lesson in this course was made by one of these channels. Tubeversity sequenced them; it did not make them. If a course is useful to you, the people below are the ones who earned it.