News for hackers. Stuff that matters.
Re:OpenVMM – A New VMM for Windows and Linux, Written in Rust by Ygg2 on Thursday October 17, 2024 @09:30AM (#41869496)
It's not unsafe that causes unsafety, it's how you wield it.

- Do you know your invariants?

- Have you documented them?

- If using unsafe block, have you asserted them or guaranteed that they hold for any input?

Granted, Rust is kind of mediocre at teaching you this. It raises warning for unsafe fn without safety documentation block, but not when omittin safety comments in unsafe blocks.

Re:OpenVMM – A New VMM for Windows and Linux, Written in Rust by gpm on Thursday October 17, 2024 @11:08AM (#41870384)
For what it's worth, clippy has an optional lint to detect undocumented unsafe blocks: https://rust-lang.github.io/rust-clippy/master/index.html#un...