A Mixed Methods Study on the Implications of Unsafe Rust for Interoperation, Encapsulation, and Tooling

The Rust programming language restricts aliasing to provide static safety guarantees. However, in certain situations, developers need to bypass these guarantees by using a set of “unsafe” features. When these features are used incorrectly, they can reintroduce the types of safety issues that Rust was designed to prevent. We seek to understand how current development tools can be improved to better assist developers who find it necessary to interact with unsafe code. To that end, we study how developers reason about foreign function calls, the limitations of the tools that they currently use, their motivations for using unsafe code, and how they reason about encapsulating it. We conducted a mixed methods investigation consisting of semi-structured interviews with 19 developers, followed by a survey that reached an additional 160 developers. Our participants were motivated to use unsafe code when they perceived that there was no alternative, and most claimed that they would avoid using it. However, limited tooling support for foreign function calls made participants uncertain about their design choices, and certain foreign aliasing and concurrency patterns were difficult to encapsulate. To overcome these challenges, developers will need analysis tools that can find Rust-specific forms of undefined behavior within multilanguage applications.

Authors

Institutions

Publication Details

Journal
ACM Transactions on Software Engineering and Methodology
Published
2026-11-18
DOI
https://doi.org/10.1145/3798277
Citations
7
Primary Topic
Logic, programming, and type systems
Type
article
Field-Weighted Citation Impact
7.15

Funders

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
article

A Mixed Methods Study on the Implications of Unsafe Rust for Interoperation, Encapsulation, and Tooling

Hanan Hibshi, Ian McCormack, Joshua S. Sunshine, Sam Estep et al.
7 citations
ACM Transactions on Software Engineering and Methodology
Logic, programming, and type systems
7.15
article

A Mixed Methods Study on the Implications of Unsafe Rust for Interoperation, Encapsulation, and Tooling

Hanan Hibshi, Ian McCormack, Joshua S. Sunshine, Sam Estep, Jonathan Aldrich, Tomas Dougan
article en
7 citations

Abstract

The Rust programming language restricts aliasing to provide static safety guarantees. However, in certain situations, developers need to bypass these guarantees by using a set of “unsafe” features. When these features are used incorrectly, they can reintroduce the types of safety issues that Rust was designed to prevent. We seek to understand how current development tools can be improved to better assist developers who find it necessary to interact with unsafe code. To that end, we study how developers reason about foreign function calls, the limitations of the tools that they currently use, their motivations for using unsafe code, and how they reason about encapsulating it. We conducted a mixed methods investigation consisting of semi-structured interviews with 19 developers, followed by a survey that reached an additional 160 developers. Our participants were motivated to use unsafe code when they perceived that there was no alternative, and most claimed that they would avoid using it. However, limited tooling support for foreign function calls made participants uncertain about their design choices, and certain foreign aliasing and concurrency patterns were difficult to encapsulate. To overcome these challenges, developers will need analysis tools that can find Rust-specific forms of undefined behavior within multilanguage applications.

ACM Transactions on Software Engineering and MethodologyVol. 35(12)
King Abdulaziz University (SA), Brown University (US), Carnegie Mellon University (US)
National Science Foundation, U.S. Department of Defense
Openalex Percentile: Top 4%
Logic, programming, and type systems
7.15
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon