Memory safety
● Without garbage collection to avoid overhead.
● Without error-prone manual memory allocations and deallocations.
● Ownership model
○ Resources can only have one owner.
○ let x = vec![1, 2, 3]; : x owns resource vec![1, 2, 3] .
○ let y = x; : Ownership of resource vec![1, 2, 3] moves to y .
○ let y = &x; : y borrows ownership of resource vec![1, 2, 3] from x .
○ Compiler can know variable “lifetime”.