Re:‘Zero-click’ hacks are growing in popularity
by nyanpasu64 on Saturday February 19, 2022 @11:07AM
(#30398103)
> Using `unsafe` to meet a deadline makes 0 sense... would never pass a code review.
I've seen unsound unchecked casts from &UnsafeCell or *mut to &mut in multiple codebases, including Firefox itself: https://github.com/emu-rs/snes-apu/blob/13c1752c0a9d43a32d05..., https://searchfox.org/mozilla-central/rev/7142c947c285e4fe4f....
Re:‘Zero-click’ hacks are growing in popularity
by qualudeheart on Saturday February 19, 2022 @10:50AM
(#30397947)
My girlfriend uses Rust for embedded systems at a large and important company. Everyone uses memory safety.
99% of the time if you're fighting the borrow checker and just want a quick solution, that solution is `clone` or `Arc<Mutex<T>>`, not `unsafe`. Those solutions will sacrifice performance, but not safety.