This program is tentative and subject to change.
About 70% of security vulnerabilities in widely deployed software originate from memory-safety bugs in languages such as C and C++. Despite decades of investment in mitigations, from static analysis and sanitizers to hardware isolation, attackers continue to exploit unsafe memory operations. A promising long-term solution is to migrate existing C++ codebases to memory-safe languages such as Rust, but doing so manually is prohibitively expensive and error-prone.
In this paper, we present Cpp2Rust, the first system capable of translating C++ programs into functionally equivalent and memory-safe Rust code automatically. By trading some performance for security, Cpp2Rust addresses the fundamental mismatch between C++’s unrestricted aliasing and Rust’s ownership model by inserting runtime-enforced ownership and mutability checks, ensuring safety while preserving semantics. To mitigate the performance overhead of dynamic checks, we developed a suite of source-to-source optimizations for Rust code that eliminate redundant ownership operations and recover much of the lost performance.
We evaluate Cpp2Rust on two real-world C++ programs, totaling 13k lines of code: WOFF2, a font compression library, and Brunsli, a JPEG lossless compression library. Cpp2Rust achieves full memory safety with only a 2% performance penalty on WOFF2 compression, while being 6$\times$ slower on Brunsli due to heavy usage of pointer arithmetic. These results demonstrate that automated, semantics-preserving translation from C++ to safe Rust is practical for some safety-critical applications, offering a viable path toward eliminating memory-safety vulnerabilities in legacy systems.
This program is tentative and subject to change.
Fri 19 JunDisplayed time zone: Mountain Time (US & Canada) change
14:00 - 15:40 | |||
14:00 20mTalk | Cpp2Rust: Automatic Translation of C++ to Safe Rust PLDI Research Papers Lucian Popescu INESC-ID; Instituto Superior Técnico - University of Lisbon, Francisco Gouveia INESC-ID; Instituto Superior Técnico - University of Lisbon, Henrique Preto INESC-ID; Instituto Superior Técnico - University of Lisbon, João Silveira INESC-ID; Instituto Superior Técnico - University of Lisbon, Dmytro Hrybenko Google, José Fragoso Santos INESC-ID; Instituto Superior Técnico - University of Lisbon, Nuno P. Lopes INESC-ID; Instituto Superior Técnico - University of Lisbon DOI Pre-print | ||
14:20 20mTalk | &inator: Correct, Precise C-to-Rust Interface Translation PLDI Research Papers Victor Chen Ohio State University, Ayden Coughlin Ohio State University, Michael D. Bond Ohio State University DOI Pre-print | ||
14:40 20mTalk | Hayroll: A Modular Wrapper for Translating C Macros and Conditional Compilation to Rust PLDI Research Papers Haoran Peng University of Washington, Baris Kasikci University of Washington, Gilbert Louis Bernstein University of Washington, Michael D. Ernst University of Washington DOI Pre-print | ||
15:00 20mTalk | VerusBelt: A Semantic Foundation for Verus’s Proof-Oriented Extensions to the Rust Type SystemDistinguished Paper PLDI Research Papers Travis Hance MPI-SWS, Laila Elbeheiry MPI-SWS, Yusuke Matsushita Kyoto University, Derek Dreyer MPI-SWS DOI | ||
15:20 20mTalk | Pure Borrow: Linear Haskell Meets Rust-Style Borrowing PLDI Research Papers DOI Pre-print | ||