4 ms·
Perhaps they aren't writing Rust because those are the people that need to write unsafe code. Chicken and egg. I'm sure it you forced all the C programmers to s
by jaisjdkaaaej 3y ago
Perhaps they aren't writing Rust because those are the people that need to write unsafe code. Chicken and egg. I'm sure it you forced all the C programmers to switch to Rust you would see a lot more use of unsafe.
- estebank 3y agoBut there are plenty of projects out there that are written in Rust and have to deal directly with hardware and syscalls. Hubris, a kernel written in Rust has 94 files referencing unsafe[1] out of 414 total .rs files[2]. This is as "bad" a ratio as you're gonna encounter in a project. There are many valid reasons one can have to not use Rust. "I need a lot of unsafe" is not really one. [1]: https://github.com/search?q=repo%3Aoxidecomputer%2Fhubris+unsafe&type=code https://github.com/search?q=repo%3Aoxidecomputer%2Fhubris+un... [2]: https://github.com/search?q=repo%3Aoxidecomputer%2Fhubris++language%3ARust&type=code https://github.com/search?q=repo%3Aoxidecomputer%2Fhubris++l...