Lectures

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

Video recording (Part 1) (September 5, 2025)

Video recording (Part 2) (September 5, 2025)

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 String type
  • References and borrowing
  • String slices

Structs and Enums

  • Defining and instantiating structs
  • Methods
  • Enums
  • Options
  • Pattern matching
  • The power of enums
  • Characteristics of object-oriented languages

Error Handling

  • Recoverable and unrecoverable errors
  • Handling unrecoverable errors with panic!
  • Handling recoverable errors with Result
  • When should we panic!?
  • Creating custom types for validation

Note: There was no audio in these video recordings due to a technical issue.

Vectors and Hash Maps

  • Storing lists of values in vectors
  • Storing key-value pairs in hash maps

Generics and Traits

  • Generic data types
  • Traits: defining shared behaviour across structs

Lifetimes

  • Providing hints to the compiler using lifetimes

Functional Rust

  • Closures: anonymous functions
  • Processing a collection of items with iterators

Smart Pointers

  • Using Box<T> to allocate memory on the heap
  • Trait objects
  • Dynamically sized types and the Sized trait
  • Wide pointers
  • The Deref trait and deref coercion
  • The Drop trait
  • Rc<T>, the reference-counted smart pointer
  • RefCell<T> and the interior mutability pattern

Fearless Concurrency

  • Multi-threaded programming
  • Message passing using channels
  • Asynchronous Rust with stackless coroutines
  • Asynchronous runtimes
  • Futures and async/.await

Best Practices and Idiomatic Rust

  • Using Clippy for static checking
  • Writing and running tests using cargo test
  • Unit vs. integration tests
  • Managing large projects with packages, crates, and modules
  • Design patterns and the singleton design pattern
  • Idiomatic Rust