1. How does Rust achieve memory safety?
- Manual malloc and free only
- A garbage collector running at runtime
- Ownership and borrowing rules checked at compile time
- Running everything in a virtual machine
Show answer
Answer: Ownership and borrowing rules checked at compile time
Safety without runtime cost.
Lesson: Why Rust