Rust —— A language empowering everyone to build reliable and efficient software.
Intro
Official Course Website
CS 110L: Safety in Systems Programming
My Homework Repository
Lec01: Why Rust
- Why not C/C++?
- Security Issue
- buffer overflow
- integer overflow(signed → unsigned)
- Security Issue
- Why not GC’ed language?
- downsides of GC
- Expensive
- Disruptive
- Non-deterministic
- Precludes manual optimization
- can not solve memory leak completely
- downsides of GC
Lec02: Memory Safety
- Why is it so easy to screw up in C?
- Dangling Pointers
- Double Frees
- Iterator Invalidation
- Memory Leaks
- Ownership Rules
- Each value in Rust has a variable that’s called its
owner
- There can only be one owner at a time
- When the owner goes out of scope, the value will dropped
- Each value in Rust has a variable that’s called its
- Lifetime
Written by Jiacheng Hu, at Zhejiang University, Hangzhou, China.