Course Structure
This page is for the course instructor.
Rust Fundamentals
The first four days make up Rust Fundamentals. The days are fast-paced and we cover a broad range of topics!
Course schedule:
- Day 1 Morning (2 hours and 10 minutes, including breaks)
| Segment | Duration |
|---|---|
| Welcome | 5 ๅ้ |
| Hello, World | 15 ๅ้ |
| Types and Values | 40 ๅ้ |
| Control Flow Basics | 45 ๅ้ |
- Day 1 Afternoon (2 hours and 45 minutes, including breaks)
| Segment | Duration |
|---|---|
| ๅผ็ต่้ฃๅ | 35 ๅ้ |
| References | 55 ๅ้ |
| User-Defined Types | 1 hour |
- Day 2 Morning (2 hours and 50 minutes, including breaks)
| Segment | Duration |
|---|---|
| Welcome | 3 ๅ้ |
| Pattern Matching | 50 ๅ้ |
| Methods and Traits | 45 ๅ้ |
| Generics | 50 ๅ้ |
- Day 2 Afternoon (2 hours and 50 minutes, including breaks)
| Segment | Duration |
|---|---|
| Closures | 30 ๅ้ |
| Standard Library Types | 1 hour |
| Standard Library Traits | 1 hour |
- Day 3 Morning (2 hours and 20 minutes, including breaks)
| Segment | Duration |
|---|---|
| Welcome | 3 ๅ้ |
| ่จๆถ้ซ็ฎก็ | 1 hour |
| Smart Pointers | 55 ๅ้ |
- Day 3 Afternoon (2 hours and 30 minutes, including breaks)
| Segment | Duration |
|---|---|
| ๅ็จ | 1 ๅฐๆๅ 15 ๅ้ |
| Lifetimes | 1 ๅฐๆๅ 5 ๅ้ |
- Day 4 Morning (2 hours and 50 minutes, including breaks)
| Segment | Duration |
|---|---|
| Welcome | 3 ๅ้ |
| Iterators | 55 ๅ้ |
| Modules | 45 ๅ้ |
| Testing | 45 ๅ้ |
- Day 4 Afternoon (2 hours and 20 minutes, including breaks)
| Segment | Duration |
|---|---|
| ้ฏ่ชค่็ | 55 ๅ้ |
| Unsafe Rust | 1 ๅฐๆๅ 15 ๅ้ |
Deep Dives
In addition to the 4-day class on Rust Fundamentals, we cover some more specialized topics:
Rust in Android
The Rust in Android deep dive is a half-day course on using Rust for Android platform development. This includes interoperability with C, C++, and Java.
You will need an AOSP checkout. Make a checkout of the course repository on the same machine and move the src/android/ directory into the root of your AOSP checkout. This will ensure that the Android build system sees the Android.bp files in src/android/.
Ensure that adb sync works with your emulator or real device and pre-build all Android examples using src/android/build_all.sh. Read the script to see the commands it runs and make sure they work when you run them by hand.
Rust in Chromium
The Rust in Chromium deep dive is a half-day course on using Rust as part of the Chromium browser. It includes using Rust in Chromiumโs gn build system, bringing in third-party libraries (โcratesโ) and C++ interoperability.
You will need to be able to build Chromium โ a debug, component build is recommended for speed but any build will work. Ensure that you can run the Chromium browser that youโve built.
Bare-Metal Rust
The Bare-Metal Rust deep dive is a full day class on using Rust for bare-metal (embedded) development. Both microcontrollers and application processors are covered.
For the microcontroller part, you will need to buy the BBC micro:bit v2 development board ahead of time. Everybody will need to install a number of packages as described on the welcome page.
Concurrency in Rust
The Concurrency in Rust deep dive is a full day class on classical as well as async/await concurrency.
You will need a fresh crate set up and the dependencies downloaded and ready to go. You can then copy/paste the examples into src/main.rs to experiment with them:
cargo init concurrency
cd concurrency
cargo add tokio --features full
cargo run
Course schedule:
- Morning (3 hours and 20 minutes, including breaks)
| Segment | Duration |
|---|---|
| Threads | 30 ๅ้ |
| Channels | 20 ๅ้ |
| Send and Sync | 15 ๅ้ |
| Shared State | 30 ๅ้ |
| Exercises | 1 ๅฐๆๅ 10 ๅ้ |
- Afternoon (3 hours and 30 minutes, including breaks)
| Segment | Duration |
|---|---|
| Async Basics | 40 ๅ้ |
| Channels and Control Flow | 20 ๅ้ |
| Pitfalls | 55 ๅ้ |
| Exercises | 1 ๅฐๆๅ 10 ๅ้ |
Idiomatic Rust
The Idiomatic Rust deep dive is a 2-day class on Rust idioms and patterns.
You should be familiar with the material in Rust Fundamentals before starting this course.
Course schedule:
- Morning (14 hours and 25 minutes, including breaks)
| Segment | Duration |
|---|---|
| Foundations of API Design | 3 ๅฐๆๅ 30 ๅ้ |
| Leveraging the Type System | 7 ๅฐๆๅ 30 ๅ้ |
| Polymorphism | 3 ๅฐๆๅ 5 ๅ้ |
Unsafe (Work in Progress)
The Unsafe deep dive is a two-day class on the unsafe Rust language. It covers the fundamentals of Rustโs safety guarantees, the motivation for unsafe, review process for unsafe code, FFI basics, and building data structures that the borrow checker would normally reject.
not found - {{%course outline Unsafe}}
Format
The course is meant to be very interactive and we recommend letting the questions drive the exploration of Rust!