4 ms·
> This is nonsense. I was referring to the current unsafe blocks used for Rust->C FFI. Obviously OS code in any language will need to perform low-level operati
by speed_spread 10mo ago
> This is nonsense.
I was referring to the current unsafe blocks used for Rust->C FFI. Obviously OS code in any language will need to perform low-level operations, those unsafe blocks are never going away.
- lelanthran 10mo ago> I was referring to the current unsafe blocks used for Rust->C FFI. You need direct shared mutable memory access with runtime locking even in the pure-Rust parts. That's kinda what OSes need, actually. Some things (Maybe DMA, possibly Page Table mutation, register saving/loading, as a few examples) can't be compile-time checked. In fact, I would guess that if you gradually moved the Linux code over to Rust, at the end of it you'd still have maybe 50% of it in unsafe blocks. So, no - your claim is no different than "if it compiles it works".