Earlier quoted context omitted.
Moderately low-level crates require some unsafe blocks. Rust is supposed to be a systems language from what I heard, so if you are going to write something larger, and/or complicated, and/or low-level, you will have to resort to unsafe blocks, I think . Hyper requires 52 packages: autocfg, bitflags, bytes, cfg-if, fnv, fuchsia-zircon, fuchsia-zircon-sys, futures-channel, futures-core, futures-sink, futures-task, futu…
One thing to bear in mind is that the libc and winapi crates are bindings to the libc and Windows C headers, so every single function signature in there will be marked unsafe because it's FFI, so those will be heavily impacting your results. You could also avoid some false positives in comments by searching for "unsafe fn" and "unsafe {", rather than just the word "unsafe", as those are the only tokens (to my knowled…
$ grep -irn 'unsafe {\|unsafe fn' . | wc -l
1780
Without rust/library/: $ grep -irn 'unsafe {\|unsafe fn' . | wc -l
1937
With rust/library/ (and libc, and winapi-rs): $ grep -irn 'unsafe {\|unsafe fn' . | wc -l
5612