This is the first day of Rust Fundamentals. We will cover a lot of ground today:
Basic Rust syntax: variables, scalar and compound types, enums, structs, references, functions, and methods.
Control flow constructs:
Pattern matching: destructuring enums, structs, and arrays.
Please remind the students that:
- They should ask questions when they get them, don’t save them to the end.
- The class is meant to be interactive and discussions are very much encouraged!
- As an instructor, you should try to keep the discussions relevant, i.e., keep the discussions related to how Rust does things vs some other language. It can be hard to find the right balance, but err on the side of allowing discussions since they engage people much more than one-way communication.
- The questions will likely mean that we talk about things ahead of the slides.
- This is perfectly okay! Repetition is an important part of learning. Remember that the slides are just a support and you are free to skip them as you like.
The idea for the first day is to show just enough of Rust to be able to speak about the famous borrow checker. The way Rust handles memory is a major feature and we should show students this right away.
If you’re teaching this in a classroom, this is a good place to go over the schedule. We suggest splitting the day into two parts (following the slides):
- Morning: 9:00 to 12:00,
- Afternoon: 13:00 to 16:00.
You can of course adjust this as necessary. Please make sure to include breaks, we recommend a break every hour!