News for hackers. Stuff that matters.
Re:What Is Rust's Hole Purpose? by leshow on Friday February 18, 2022 @01:52PM (#30389587)
That's well and good for safe Rust, but unsafe Rust is hard as hell to audit because nobody _really_ knows what the rules are. We're kind of still figuring out how to write unsafe Rust safely. Have a look at the "too many linked lists" book, which turns out to have had a fundamental error in it for years.

I think miri is a part of the answer to this, but it is not perfect. At the end of the day, you need unsafe at some level to do anything useful, and we need more explicit rules about how to do it properly.

Re:What Is Rust's Hole Purpose? by zozbot234 on Friday February 18, 2022 @02:05PM (#30389778)
It should be at least no harder than modern C, where any undefined behavior is a license for the optimizer to outright ignore the code you actually wrote. The main practical difficulty stems from the fact that Safe Rust rules are fully in effect even in an unsafe block, so you need to assess where references can be used instead of general pointers etc.
Re:What Is Rust's Hole Purpose? by avgcorrection on Friday February 18, 2022 @04:30PM (#30391374)
What was the Rustonomicon error?
Re:What Is Rust's Hole Purpose? by steveklabnik on Friday February 18, 2022 @05:07PM (#30391749)
Re:What Is Rust's Hole Purpose? by leshow on Tuesday February 22, 2022 @11:25AM (#30429801)
not rustonomicon, https://rust-unofficial.github.io/too-many-lists/fifth-layou... there are new sections that were recently added to this