CS110L: Safety in Systems Programming
- Offered by: Stanford
- Prerequisites: basic knowledge about programming and computer system
- Programming Languages: Rust
- Difficulty: 🌟🌟🌟
- Class Hour: 30 hours
In this course, you will learn a fantastic language, Rust.
If you have studied C and have some knowledge of systems programming, you should have heard about memory leaks and the danger of pointers, but C's high efficiency makes it impossible to be replaced by other higher-level languages with garbage collection such as Java in system-level programming. Whereas Rust aims to make up for C's lack of security while having competitive efficiency. Therefore, Rust was designed from a system programmer's point of view. By learning Rust, you will learn the principles to write safer and more elegant system code (e.g., operating systems, etc.).
The latter part of this course focuses on the topic of concurrency, where you will systematically learn multi-processing, multi-threading, event-driven programming, and several other techniques. In the second project, you will compare the pros and cons of each method.
Personally, I find the concept of "futures" in Rust fascinating and elegant, and mastering this idea will help you in your following systems-related courses. In addition, Tsinghua University's operating system lab, rCore is based on Rust. You can see the documentation for more details.
- Course Website: https://reberhardt.com/cs110l/spring-2020/
- Recordings: https://youtu.be/j7AQrtLevUE
- Textbook: None
- Assignments: 6 Labs, 2 Projects, the course website has specific requirements. The projects are quite interesting where you will Implement a GDB-like debugger and a load balancer in Rust.
All the resources and assignments used by @PKUFlyingPig in this course are maintained in PKUFlyingPig/CS110L - GitHub.
Due to the rapid evolution of Rust, the libraries used in the 2020 version of the course project are obsolete, so @fung-hwang tried to adapt these libraries (in November 2022). His adaptation advice and completed assignments are maintained in fung-hwang/CS110L-2020spr - GitHub. It is possible that Rust and these libraries will have changed again when you start to learn CS110L, but you can still refer to this repo for help.