CAS CS 392
Table of Contents
Rust, in Practice and in Theory |
Boston University |
Fall 2025 |
This is a course about the programming language Rust, and, for better or for worse, this can mean a lot of things. Part of what making Rust fascinating (and what makes this course a pain to teach) is that it has a lot to offer. You might be coming to this course with an interest in systems programming (an unreasonbly broad term), or PL design (ditto). Regardless, our goal is not just to program in Rust, but also to understand the theoretical underpinnings of the language. So in reality you'll probably need to have at least a passing interest in both perspectives.
We'll spend the first half of this course learning how to program in Rust, and the second half working on a self-defined project in Rust or an adjacent topics.
Links
- Course Manual
- Piazza
- Gradescope (6K4D32)
- Reading:
- Other Resources:
Calendar
Date | Topic | Notes |
---|---|---|
09-02 | Basics I: Introduction, Installation, Cargo | |
09-04 | Basics II: Common Programming Concepts | A1 out |
09-09 | Data I: Stack, Heap, References | |
09-11 | Data II: Struct, Enums, Collections | A2 out, A1 due |
09-16 | Theory I: Straight Line Programs (salt0) | |
09-18 | Theory II: Variables and References (salt1) | A3 out, A2 due |
09-23 | Functions I: Generics and Traits | |
09-25 | Functions II: Closures and Iterators | A4 out, A3 due |
09-30 | Smart Pointers I: Boxes, Recursive Data | |
10-02 | Smart Pointers II: Rc<T> and RefCell<T> |
A5 out, A4 due |
10-07 | Theory III: Blocks and Lifetimes | |
10-09 | Theory IV: Tuples and Paths | A6 out, A5 due |
10-14 | NO CLASS | Indigenous Peoples' Day |
10-16 | Concurrency I: Message Passing | A6 due |
10-21 | Concurrency II: Asynchronous Programming | |
10-23 | Midterm Exam | A7 out |
10-28 | Theory V: Conditionals | |
10-30 | Theory VI: Linear Typed Lambda Calculus | FP outline out, A7 due |
11-04 | Advanced I: TBD | |
11-06 | Project Meetings | FP outline due |
11-11 | Advanced II: TBD | |
11-13 | Project Meetings | FP check-in 1 |
11-18 | Advanced III: TBD | |
11-20 | Project Meetings | FP check-in 2 |
11-25 | Advanced IV: TBD | |
11-27 | NO CLASS | Thanksgiving |
12-02 | Advance V: TBD | |
12-04 | Final Project Presentations | |
12-09 | Final Project Presentations | FP due |
Week 1: Basics ✓
Meeting 1
- Title: Course Introduction
- Reading:
- Syllabus
- The Rust Programming Language (RPL): Forward
- RPL: Introduction
- RPL 1: Getting Started
- Material:
- Slides: 01-intro.pdf
- Slides: 01-intro.pdf
Meeting 2
- Title: Common Programming Concepts
- Reading:
- RPL 2: Programming a Guessing Game
- RPL 3: Common Programming Concepts
- Material:
- Slides: 02-basics.pdf
- Assignment: hw1.html
- Slides: 02-basics.pdf
Week 2: Data ✓
Meeting 3
- Title: Stack, Heap, References
- Reading:
- RPL 4.2: References and Borrowing
- RPL 4.1: What is Ownership?
- Material:
- Slides: 03-stack-heap.pdf
- Slides: 03-stack-heap.pdf
Meeting 4
- Title: Structures, Enumerations, Collections
- Reading:
- RPL 5: Using Structs to Structure Related Data
- PRL 6: Enums and Pattern Matching
- RPL 18: Patterns and Matching
- RPL 4.3: The Slice Type
- RPL 8: Common Collections
- Material:
- Slides: 04-structs-enums.pdf
- Assignment: hw2.html
- Slides: 04-structs-enums.pdf
Week 3: Theory ✓
Meeting 5
Week 4: Functions ✓
Meeting 7
- Title: Generics and Traits
- Reading:
- RPL 10.1: Generic Data Types
- RPL 10.2: Traits: Defining Shared Behavior
Week 5: Smart Pointers
Meeting 9
Meeting 10
- Title: Reference Counting and Internal Mutability
- Reading:
- RPL 15.4:
Rc<T>
, the Reference Counted Smart Pointer - RPL 15.5:
RefCell<T>
and the Interior Mutability Pattern - RPL 15.6: Reference Cycles Can Leak Memory
- RPL 15.4:
Week 6: Theory
Meeting 11
- Title: Blocks and Lifetimes
- Reading:
- RPL 10.3: Validating References with Lifetimes
- Rustonomicon:
- 3.2: Aliasing
- 3.3: Lifetimes
- 3.4: Limits of Lifetimes
- 3.5: Lifetime Elision