Is Rust Used Safely by Software Developers?
Not on the map. Why?
Abstract (arXiv)
Rust, an emerging programming language with explosive growth, provides a robust type system that enables programmers to write memory-safe and data-race free code. To allow access to a machine's hardware and to support low-level performance optimizations, a second language, Unsafe Rust, is embedded in Rust. It contains support for operations that are difficult to statically check, such as C-style pointers for access to arbitrary memory locations and mutable global variables. When a program uses these features, the compiler is unable to statically guarantee the safety properties Rust promotes. In this work, we perform a large-scale empirical study to explore how software developers are using Unsafe Rust in real-world Rust libraries and applications. Our results indicate that software engineers use the keyword unsafe in less than 30% of Rust libraries, but more than half cannot be entirely statically checked by the Rust compiler because of Unsafe Rust hidden somewhere in a library's call chain. We conclude that although the use of the keyword unsafe is limited, the propagation of unsafeness offers a challenge to the claim of Rust as a memory-safe language. Furthermore, we recommend changes to the Rust compiler and to the central Rust repository's interface to help Rust software developers be aware of when their Rust code is unsafe.
Key facts. Cited by 5 papers in the map (data through 7 Oct 2026). First posted on arXiv 1 Jul 2020.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2022: 1; 2023: 0; 2024: 1; 2025: 2; 2026: 1.
5 papers.
- 2024Building an Efficient Multilingual Non-Profit IR System for the Islamic Domain Leveraging Multiprocessing Design in Rustcited by 3
- 2025Can Safety Fine-Tuning Be More Principled? Lessons Learned from Cybersecuritycited by 1
- 2025deepSURF: Detecting Memory Safety Vulnerabilities in Rust Through Fuzzing LLM-Augmented Harnessescited by 1
- 2026RustMizan: A Compilable, Contamination-Aware Benchmarking Framework for Rust Vulnerabilitiescited by 1
- 2022Ruby: Unmasking Unsafe Rust in Stripped Binaries via Machine Learningcited by 0
- 2026RustMizan: A Compilable, Contamination-Aware Benchmarking Framework for Rust Vulnerabilities6 Jul 2026
- 2025deepSURF: Detecting Memory Safety Vulnerabilities in Rust Through Fuzzing LLM-Augmented Harnesses18 Jun 2025
- 2025Can Safety Fine-Tuning Be More Principled? Lessons Learned from Cybersecurity19 Jan 2025
- 2024Building an Efficient Multilingual Non-Profit IR System for the Islamic Domain Leveraging Multiprocessing Design in Rust9 Nov 2024
- 2022Ruby: Unmasking Unsafe Rust in Stripped Binaries via Machine Learning31 Oct 2022