Lecture Slides and Video Recordings
The presentation slides used in these lectures will be posted in this page before the lectures, and may be updated after each lecture is concluded. There are a total of 12 lectures in this course, each two hours.
Introduction to the Course
- About me
- Goals and the course structure (4 assignments, 1 project)
- Course website
- Textbook
- Grading policy
- Advantages of the Rust programming language
Learning Rust the Hands-On Way
- Reading the errors carefully
- Installing and using the Rust toolchain
- Creating, building, and running the first Rust project
- Implementing a guessing game
Basic Programming Concepts
- Mutable and immutable variabls
- Static types
- Scalar data types
- Compound data types
- Functions
- If expressions
- Loops
Ownership and the String Type
- Ownership: a unique feature in Rust towards memory safety
- The
Stringtype - References and borrowing
- String slices
Quiz 1 Sample Questions — Answer Key
Structs and Enums
- Defining and instantiating structs
- Methods
- Enums
- Options
- Pattern matching
- The power of enums
- Characteristics of object-oriented languages
Quiz 2 Sample Questions — Answer Key
Error Handling
- Recoverable and unrecoverable errors
- Handling unrecoverable errors with
panic! - Handling recoverable errors with
Result - To
panic!or not topanic!
Quiz 3 Sample Questions — Answer Key
Vectors and Hash Maps
- Storing lists of values in vectors
- Storing key-value pairs in hash maps
Sample Midterm Examination 1 — Answer Key
Sample Midterm Examination 2 — Answer Key
Sample Midterm Examination 3 — Answer Key
Midterm Examination — Answer Key
Generics and Traits
- Generic data types
- Traits: defining shared behaviour across structs
Lifetimes
- Basic concepts of lifetimes
- Providing hints to the compiler using lifetimes