How Do Programmers Use Unsafe Rust?
summary
Paper analyzes unsafe Rust across the ecosystem using the Qrates framework and a modified compiler to compile and extract MIR from almost 29k compiled crates (≈32k crates total). It reports ~25% of crates contain unsafe, three quarters of unsafe blocks are ≤21 MIR statements (median ~10), only ~7% of unsafe calls target other crates, and 88% of unsafe functions are public largely because they are raw bindings for FFI or hardware.
AI-written summary · about








