Building Safe and Secure Systems in Rust
summary
Rust reduces many memory bugs but the concrete takeaways matter: dependency C libraries and FFI caused a real CVE via rusqlite/SQLite, large projects like MesaLock Linux and masterbox show proof of concept, and toolchain work surfaces unsafe use. The author compiles ~10,000 crates, finds about 3,000 crates with unsafe and ~600k lines of unsafe code, demonstrates miniz_oxide double‑free patterns from C APIs, and uses cargo-audit, Miri and c2rust to find and mitigate these issues.
AI-written summary · about
chapters (21)
- 0:00Intro
- 0:54Baidu X-Lab
- 1:46Outline
- 3:01Approaches to Mitigate Memory Corruption Errors
- 4:01Building Safe and Secure Systems in Rust
- 6:23Challenges
- 9:02What is unsafe Rust?
- 9:31Unsafe Superpowers
- 11:39"Unsafe" is agnostic
- 13:38Case study: lon Shell
- 14:12Dependency graph of lon shell
- 15:21cargo build
- 16:04Case study: rusqlite
- 17:26Data Collection and Study
- 18:08Usage of external libraries ( = 100)
- 19:46"unsafe" code
- 21:20Lessons Learned
- 29:46How to Contribute?
- 31:42Open Questions
- 36:43Existing Projects
- 41:47Conclusion








