3 ms·
Re: comments about relative safety to C, I don't know specifically what kind of comments you're talking about, but Rust's memory safety guarantees are: - No da
by mplanchard 2y ago
Re: comments about relative safety to C, I don't know specifically what kind of comments you're talking about, but Rust's memory safety guarantees are:
- No data races: it is impossible in safe Rust for two threads to simultaneously mutate memory without appropriate guards
- No reads/writes from memory that is not owned/allocated
- Any location in memory may only have a single mutable reference at a time (and any number of immutable references)
Combined, you eliminate a large class of memory-related bugs, including use-after-frees, double frees, and buffer under/overflows.