Challenges in C++ to Rust Translation with Large Language Models: A Preliminary Empirical Study
C++ programming language is one of the mainstream choices for developing various systems due to its efficiency and widespread application, particularly in fields with high-performance requirements. However, C++ programs may have many memory management and security issues, such as dangling pointers and memory leaks, which pose increasing challenges in modern software development. As a modern programming language designed to address memory safety issues, Rust has gained widespread attention for its ownership system and memory safety features, driving research and practice in migrating C++ code to Rust. However, the differences in syntax and features between C++ and Rust, as well as C++'s complex and object-oriented features, make it extremely difficult to directly convert C++ code into Rust code.
Authors
- Yang Feng (ORCID: https://orcid.org/0000-0002-7477-3642)
- Qiang He (ORCID: https://orcid.org/0000-0001-5901-5627)
- Baowen Xu (ORCID: https://orcid.org/0000-0001-7743-1296)
- Yanyan Yan
- Jun Zeng
Institutions
- Nanjing University (CN)
Publication Details
- Published
- 2025-10-09
- DOI
- https://doi.org/10.1145/3759425.3763380
- Primary Topic
- Natural Language Processing Techniques
- Type
- article
- Field-Weighted Citation Impact
- 0.00
Funders
- National Natural Science Foundation of China