4 ms·
I think at the OS level, safety from Rust are less useful. The "wrap unsafe code" doesn't really work.
by Thaxll 8y ago
I think at the OS level, safety from Rust are less useful. The "wrap unsafe code" doesn't really work.
- steveklabnik 8y agoHave you tried it? My experience is that it works pretty well, though I've mostly been working on toys. Even bigger projects like Redox have shown that you generally don't need very much unsafe.
- blintzing 8y agoThere’s a nice Stanford class I took called CS 140E that had students write an OS for the Raspeberry Pi in Rust. There are actually some benefits to using Rust at this level, though it can be a bit cumbersome at times. Check it out here: https://web.stanford.edu/class/cs140e/ https://web.stanford.edu/class/cs140e/
- pieterr 8y agoInteresting! One of the instructors is RocketMan. :-) https://crates.io/crates/rocket https://crates.io/crates/rocket
- TomMarius 8y agoWhat do you mean, doesn't really work? In my experience, it works perfectly. Could you share more info?
- leshow 8y agoIf you've written any amount of Rust then that's provably not true. You've no doubt used functions & methods that use unsafe (somewhere down along the line), and you didn't need to deal with it. That's 'wrapping unsafe code' used in practice. You got to write safe because someone else wrote the unsafe wrapper.