News for hackers. Stuff that matters.
Re:Implementing tile encoding in rav1e by unrealhoang on Thursday April 25, 2019 @12:00PM (#19749478)
But why? That’s is exactly the reason why unsafe exists: to open an escape hatch to do something that is impossible to do in safe Rust (and then wrap that under a safe interface). Your safe Rust, standard library, is constructed exactly the same way: based on unsafe. Unsafe doesn’t magically make your code unsafe, it’s just that you tell the compiler to trust you to handle the problem correctly (usually by meddling directly with pointers).
Re:Implementing tile encoding in rav1e by Thaxll on Thursday April 25, 2019 @12:21PM (#19749680)
For me the question was more, isn't Rust supposed to have fearless concurrency meaning no "unsafe" part to modify data between threads.
Re:Implementing tile encoding in rav1e by mmastrac on Thursday April 25, 2019 @12:54PM (#19750056)
What would most likely here would be abstracting this problem into a library that could isolate "unsafe" in a place where it could be specified, tested and examined in isolation.