Lune

OOPSLA2023Top-tier venue

Aliasing Limits on Translating C to Safe Rust

Mehmet Emre, Peter Boyland, Aesha Parekh, Ryan Schroeder, Kyle Dewey, Ben Hardekopf

Abstract

The Rust language was created to provide safe low-level systems programming. There is both industrial and academic interest in the problem of (semi-)automatically translating C code to Rust in order to exploit Rust's safety guarantees. We study the effectiveness and limitations of existing techniques for automatically translating unsafe raw pointers (in Rust programs translated from C) into safe Rust references via ownership and lifetime inference. Our novel evaluation methodology enables our study to extend beyond prior studies, and to discover new information contradicting the conclusions of prior studies. We find that existing translation methods are severely limited by a lack of precision in the Rust compiler's safety checker, causing many safe pointer manipulations to be labeled as potentially unsafe. Leveraging this information, we propose methods for improving translation, based on encoding the results of a more precise analysis in a manner that is understandable to an unmodified Rust compiler. We implement one of our proposed methods, increasing the number of pointers that can be translated to safe Rust references by 75% over the baseline (from 12% to 21% of all pointers).

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.

12 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

  • Scylla: Translating an Applicative Subset of C to Safe Rust cites Translating C to safer Rust
  • Scylla: Translating an Applicative Subset of C to Safe Rust cites To Tag, or Not to Tag: Translating C's Unions to Rust's Tagged Unions
  • Hayroll: A Modular Wrapper for Translating C Macros and Conditional Compilation to Rust cites Scylla: Translating an Applicative Subset of C to Safe Rust
  • Hayroll: A Modular Wrapper for Translating C Macros and Conditional Compilation to Rust cites RustAssure: Differential Symbolic Testing for LLM-Transpiled C-to-Rust Code
  • Hayroll: A Modular Wrapper for Translating C Macros and Conditional Compilation to Rust cites Translating C to safer Rust
  • Hayroll: A Modular Wrapper for Translating C Macros and Conditional Compilation to Rust cites To Tag, or Not to Tag: Translating C's Unions to Rust's Tagged Unions
  • Hayroll: A Modular Wrapper for Translating C Macros and Conditional Compilation to Rust cites SmartC2Rust: Iterative, Feedback-Driven C-to-Rust Translation via Large Language Models for Safety and Equivalence
  • RustAssure: Differential Symbolic Testing for LLM-Transpiled C-to-Rust Code cites Translating C to safer Rust
  • C to checked C by 3c cites Translating C to safer Rust
  • To Tag, or Not to Tag: Translating C's Unions to Rust's Tagged Unions cites Translating C to safer Rust
  • SmartC2Rust: Iterative, Feedback-Driven C-to-Rust Translation via Large Language Models for Safety and Equivalence cites Translating C to safer Rust
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers12

  1. RustAssure: Differential Symbolic Testing for LLM-Transpiled C-to-Rust CodeYubo Bai, Tapti PalitASE 2025 · 8 citations
  2. Scylla: Translating an Applicative Subset of C to Safe RustAymeric Fromherz, Jonathan ProtzenkoOOPSLA 2026 · 6 citations
  3. To Tag, or Not to Tag: Translating C's Unions to Rust's Tagged UnionsJaemin Hong, Sukyoung RyuASE 2024 · 6 citations
  4. SmartC2Rust: Iterative, Feedback-Driven C-to-Rust Translation via Large Language Models for Safety and EquivalenceMomoko Shiraishi, Yinzhi Cao, Takahiro ShinagawaICSE 2026 · 4 citations
  5. Hayroll: A Modular Wrapper for Translating C Macros and Conditional Compilation to RustHaoran Peng, Baris Kasikci, Gilbert Louis Bernstein, Michael D. ErnstPLDI 2026 · 1 citation

Builds on2

  1. Translating C to safer RustMehmet Emre, Ryan Schroeder, Kyle Dewey, Ben HardekopfOOPSLA 2021 · 60 citations
  2. C to checked C by 3cAravind Machiry, John H. Kastner, Matt McCutchen, Aaron Eline et al.OOPSLA 2022 · 20 citations

Related papers

  1. Ownership Guided C to Rust TranslationHanliang Zhang, Cristina David, Yijun Yu, Meng WangCAV 2023 · 37 citations
  2. Translating C To Rust: Lessons from a User StudyRuishi Li, Bo Wang, Tianyu Li, Prateek Saxena et al.NDSS 2025
  3. &inator: Correct, Precise C-to-Rust Interface TranslationVictor Chen, Ayden Coughlin, Michael D. BondPLDI 2026 · 1 citation
  4. How do programmers use unsafe rust?Vytautas Astrauskas, Christoph Matheja, Federico Poli, Peter Müller et al.OOPSLA 2020 · 78 citations
  5. Raw Pointer Rewriting with LLMs for Translating C to Safer RustYifei Gao, Chengpeng Wang, Pengxiang Huang, Xuwei Liu et al.ACL Findings 2026 · 3 citations
Dusk over the sea between two cliffs drawn in fine vertical lines