Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

For very low-level stuff (e.g. embedded) you might need a lot of unsafe. For the vast majority of software it’s extremely rare. I worked full time for five years on a Rust project (https://github.com/MaterializeInc/materialize) and anecdotally, unsafe code was much less than 1% of the codebase.


I don't have direct experience, but from what I can gather between others, and my general embedded experience, unsafe in the worse case of embedded would still be just a small percentage of all code. (a device driver which would need unsafe to deal with hardware still has a lot of code that doesn't deal with hardware)

There is some rust code out there that is more than 50% unsafe though.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: