4 ms·
It is available on arXiv. Link follows: https://arxiv.org/abs/2007.00752 https://arxiv.org/abs/2007.00752
by throwaway17_17 6y ago
It is available on arXiv. Link follows:
https://arxiv.org/abs/2007.00752 https://arxiv.org/abs/2007.00752
- steveklabnik 6y agoIt's... fine. It's got some issues though. Like: > Since Unsafe Rust may modify an arbitrary memory location, any use of Unsafe Rust in any dependency compromises the static guarantees of the whole library With this definition, literally every Rust program is not safe, because: 1. Most operating systems don't have syscalls written in Rust, so doing anything at all ends up needing unsafe. 2. Even if you wrote an OS with safe syscalls, doing things with the hardware is going to require unsafe. So, buried somewhere in there, unsafe will exist. So I don't personally think this definition makes a lot of sense. To me personally, comments like this are more interesting, and tell a different story: > The number of unsafe blocks per crate is small for the majority of the crates, more than 90% of the crates have fewer than ten unsafe blocks This validates one of Rust's core propositions, IMHO. From eyeballing the graph, it seems that ~70 of crates have zero unsafe? Very interesting.