Lune

NDSS2025Top-tier venue

Translating C To Rust: Lessons from a User Study

Ruishi Li, Bo Wang, Tianyu Li, Prateek Saxena, Ashish Kundu

Abstract

Rust aims to offer full memory safety for programs, a guarantee that untamed C programs do not enjoy. How difficult is it to translate existing C code to Rust? To get a complementary view from that of automatic C to Rust translators, we report on a user study asking humans to translate real-world C programs to Rust. Our participants are able to produce safe Rust translations, whereas state-of-the-art automatic tools are not able to do so. Our analysis highlights that the high-level strategy taken by users departs significantly from those of automatic tools we study. We also find that users often choose zero-cost (static) abstractions for temporal safety, which addresses a predominant component of runtime costs in other full memory safety defenses. User-provided translations showcase a rich landscape of specialized strategies to translate the same C program in different ways to safe Rust, which future automatic translators can consider.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

6 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Project-Level C-to-Rust Translation via Pointer Knowledge Graphs cites Lost in Translation: A Study of Bugs Introduced by Large Language Models while Translating Code
  • Project-Level C-to-Rust Translation via Pointer Knowledge Graphs cites Translating C to safer Rust
  • Scylla: Translating an Applicative Subset of C to Safe Rust cites Lost in Translation: A Study of Bugs Introduced by Large Language Models while Translating Code
  • Scylla: Translating an Applicative Subset of C to Safe Rust cites Translating C to safer Rust
  • &inator: Correct, Precise C-to-Rust Interface Translation cites Scylla: Translating an Applicative Subset of C to Safe Rust
  • &inator: Correct, Precise C-to-Rust Interface Translation cites Translating C to safer Rust
  • SmartC2Rust: Iterative, Feedback-Driven C-to-Rust Translation via Large Language Models for Safety and Equivalence cites Lost in Translation: A Study of Bugs Introduced by Large Language Models while Translating Code
  • SmartC2Rust: Iterative, Feedback-Driven C-to-Rust Translation via Large Language Models for Safety and Equivalence cites Translating C to safer Rust
  • Cpp2Rust: Automatic Translation of C++ to Safe Rust cites Scylla: Translating an Applicative Subset of C to Safe Rust
  • Cpp2Rust: Automatic Translation of C++ to Safe Rust cites Translating C to safer Rust
  • Cpp2Rust: Automatic Translation of C++ to Safe Rust cites SmartC2Rust: Iterative, Feedback-Driven C-to-Rust Translation via Large Language Models for Safety and Equivalence
  • PAC it up: Towards Pointer Integrity using ARM Pointer Authentication cites Data-Oriented Programming: On the Expressiveness of Non-control Data Attacks
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers6

  1. Scylla: Translating an Applicative Subset of C to Safe RustAymeric Fromherz, Jonathan ProtzenkoOOPSLA 2026 · 6 citations
  2. SmartC2Rust: Iterative, Feedback-Driven C-to-Rust Translation via Large Language Models for Safety and EquivalenceMomoko Shiraishi, Yinzhi Cao, Takahiro ShinagawaICSE 2026 · 4 citations
  3. &inator: Correct, Precise C-to-Rust Interface TranslationVictor Chen, Ayden Coughlin, Michael D. BondPLDI 2026 · 1 citation
  4. Cpp2Rust: Automatic Translation of C++ to Safe RustLucian Popescu, Francisco Gouveia, Henrique Preto, João Silveira et al.PLDI 2026 · 1 citation
  5. Project-Level C-to-Rust Translation via Pointer Knowledge GraphsZhiqiang Yuan, Wenjun Mao, Zhuo Chen, Xiyue Shang et al.FSE 2026

Builds on13

  1. Data-Oriented Programming: On the Expressiveness of Non-control Data AttacksHong Hu, Shweta Shinde, Sendroiu Adrian, Zheng Leong Chua et al.S&P 2016 · 420 citations
  2. PAC it up: Towards Pointer Integrity using ARM Pointer AuthenticationHans Liljestrand, Thomas Nyman, Kui Wang, Carlos Chinea Perez et al.USENIX Security 2019 · 168 citations
  3. Lost in Translation: A Study of Bugs Introduced by Large Language Models while Translating CodeRangeet Pan, Ali Reza Ibrahimzada, Rahul Krishna, Divya Sankar et al.ICSE 2024 · 96 citations
  4. Using Safety Properties to Generate Vulnerability PatchesZhen Huang, David Lie, Gang Tan, Trent JaegerS&P 2019 · 91 citations
  5. Translating C to safer RustMehmet Emre, Ryan Schroeder, Kyle Dewey, Ben HardekopfOOPSLA 2021 · 60 citations

Related papers

  1. Aliasing Limits on Translating C to Safe RustMehmet Emre, Peter Boyland, Aesha Parekh, Ryan Schroeder et al.OOPSLA 2023 · 32 citations
  2. Ownership Guided C to Rust TranslationHanliang Zhang, Cristina David, Yijun Yu, Meng WangCAV 2023 · 37 citations
  3. VERT: Polyglot Verified Equivalent Rust Transpilation with Large Language ModelsAidan Z. H. Yang, Yoshiki Takashima, Brandon Paulsen, Josiah Dodds et al.ASE 2025 · 1 citation
  4. Concrat: An Automatic C-to-Rust Lock API Translator for Concurrent ProgramsJaemin Hong, Sukyoung RyuICSE 2023 · 17 citations
  5. Is rust used safely by software developers?Ana Nora Evans, Bradford Campbell, Mary Lou SoffaICSE 2020 · 57 citations
Dusk over the sea between two cliffs drawn in fine vertical lines