Introduction to the Course
Performant Software Systems with Rust — Lecture 1
Baochun Li, Professor
Department of Electrical and Computer Engineering
University of Toronto
About me
function hello(name) {
return "hello " + name
}
Baochun Li
- B.Eng., CS, Tsinghua University (1995)
- M.Sc. & Ph.D., CS, Univ. of Illinois, Urbana-Champaign (1997 & 2000)
- Computer Engineering Group, ECE, Univ. of Toronto (2000 - present)
- IEEE Fellow (2015)
- Fellow, Canadian Academy of Engineering (2023)
- Fellow, Engineering Institute of Canada (2024)
My research
- Research interests
- Cloud computing, distributed machine learning
- Computer networking
- Security & privacy
- Vision
- Bridge the gap between theory and practice
- Small research team
- alumni \(\rightarrow\) academia: 23
- Website: iqua.ece.toronto.edu
Overarching course objective
To develop a practical and in-depth understanding for building modern software systems with Rust, with a focus on reading code
Why Rust?
- Reliable
- Memory safe
- Thread safe \(-\) no race conditions
- Static types
- Runtime errors \(\rightarrow\) compile-time errors
Why Rust?
- Highly performant
- Full control over low-level details
- No garbage collectors
- Minimized memory footprint
- Threads and stackless coroutines
Why Rust?
- Excellent ecosystem and tooling
- Surprisingly useful compile-time error messages
- The cargo package manager & crates.io
- Documentation & docs.rs
What do we cover (tentative)
- Basic Programming Concepts and Ownership
- Structs and Enums
- Options and Error Handling
- Strings, Vectors, Hash maps, and Slices
- Generic types, Traits, and Lifetimes
- Functional Rust with closures and iterators
- Smart Pointers to Data on the Heap
- Fearless Concurrency
- Best Practices, Design Patterns, and Idiomatic Rust
Rust is a language for the next 40 years
- High and low level
- Code for web assembly, containers, or bare metal chips
- Fast, reliable, productive — pick three
- Fearless concurrency
As a (relatively) recent example, OpenAI’s Codex CLI was previously implemented in TypeScript, and re-implemented in Rust in June 2025
With AI agents, why do we still need to learn programming at all?
- AI has been widely known to be effective as a coding assistant — “coding is a solved problem”
- But what about the cream — 1-2% — at the top?
- Humans are still essential, at least today
- But without knowing the language at the finest detail, you cannot write that last 1%!
- Even if you don’t need to write any code, you still need to read them today to keep quality high
Good tastes for coding will soon become a lost art — and this course aims to keep it
Office Hours
Wednesdays, 1-2 p.m., BA 4118
or by appointment
Assignments
- Reversi board game
- Search utility
- Web client
- Web server
- New this term: the use of a dedicated Rust playground, called Rustrace, is required
In-class quizzes
- 6 in total, last five minutes of the lecture
- Dates are pre-announced in the course syllabus
- The top 4 of the 6 contribute to the term grade (10% in total, 2.5% each)
- Conducted (and marked) on paper, so bring a few pencils
- Five multiple-choice questions, one minute each
Midterm and final examinations
- 110 minutes each
- Dates are pre-announced in the course syllabus
- All questions are multiple-choice questions, so bring an ample supply of pencils
- Closed book, closed notes, no cell phones, no computers
- Focus on reading lots of code — which is a required skill in the AI era — not writing
No course project
- Course projects will no longer be useful as a learning experience
- Students will be using AI agents anyway
- If you have plenty of time and would like to take up an ambitious Rust project on an individual basis, you can discuss your plans with me
- But it will not contribute to the term grade