SACTOR: LLM-Driven Correct and Idiomatic C to Rust Translation with Static Analysis and FFI-Based Verification
Not on the map. Why?
Abstract (arXiv)
Translating software written in C to Rust has significant benefits in improving memory safety. However, manual translation is cumbersome, error-prone, and often produces unidiomatic code. Large language models (LLMs) have demonstrated promise in producing idiomatic translations, but offer no correctness guarantees. We propose SACTOR, an LLM-driven C-to-Rust translation tool that employs a two-step process: an initial "unidiomatic" translation to preserve semantics, followed by an "idiomatic" refinement to align with Rust standards. To validate correctness of our function-wise incremental translation that mixes C and Rust, we use end-to-end testing via the foreign function interface. We evaluate SACTOR on 200 programs from two public datasets and on two more real-world scenarios (a 50-sample subset of CRust-Bench and the libogg library), comparing multiple LLMs. Across datasets, SACTOR delivers high end-to-end correctness and produces safe, idiomatic Rust with up to 7 times fewer Clippy warnings; On CRust-Bench, SACTOR achieves an average (across samples) of 85% unidiomatic and 52% idiomatic success, and on libogg it attains full unidiomatic and up to 78% idiomatic coverage on GPT-5.
Key facts. Cited by 9 papers in the map (data through 14 Oct 2026). Builds on 11 of its 50 references that are in the map. First posted on arXiv 16 Mar 2025.
Builds on
11 of 50 references.
References · 11
- 2024Long-context LLMs Struggle with Long In-context Learningcited by 286
- 2021CodeNet: A Large-Scale AI for Code Dataset for Learning a Diversity of Coding Taskscited by 200
- 2022Do Users Write More Insecure Code with AI Assistants?cited by 192
- 2022Code Translation with Compiler Representationscited by 42
- 2016A Survey of Symbolic Execution Techniquescited by 36
- 2024Towards Translating Real-World Code with LLMs: A Study of Translating to Rustcited by 35
- 2024LongGenBench: Long-context Generation Benchmarkcited by 28
- 2024VERT: Verified Equivalent Rust Transpilation with Large Language Models as Few-Shot Learnerscited by 20
- 2025C2SaferRust: Transforming C Projects into Safer Rust with NeuroSymbolic Techniquescited by 18
- 2024Syzygy: Dual Code-Test C to (safe) Rust Translation using LLMs and Dynamic Analysiscited by 16
- 2023Ownership guided C to Rust translationcited by 13
Built on by
Citing papers per year: 2025: 2; 2026: 7.
9 papers.
- 2025From Code Foundation Models to Agents and Applications: A Comprehensive Survey and Practical Guide to Code Intelligencecited by 15
- 2026ReCodeAgent: A Multi-agent Workflow for Language-Agnostic Translation and Validation of Large-Scale Repositoriescited by 2
- 2026Verifier-Guided Code Translation via Meta-Step Decodingcited by 2
- 2026His2Trans: A Knowledge-Guided Agentic Framework for Project-Level C-to-Rust Migrationcited by 1
- 2025SoK: Understanding (New) Security Issues Across AI4Code Use Casescited by 0
- 2026Documentation-Guided Agentic Codebase Migration from C to Rustcited by 0
- 2026Towards Reliable C-to-Rust Translation with Rule-Guided Reasoning and Reinforcement Learningcited by 0
- 2026Fine-Tuning Qwen3-27B for C-to-Rust Code Translation: A Three-Stage Curriculum of Pretraining, Debugging-Aware SFT, and Task-Specific SFTcited by 0
- 2026Translator vs. Challenger: Adversarial Agentic Learning for C-to-Rust Translationcited by 0
- 2026Translator vs. Challenger: Adversarial Agentic Learning for C-to-Rust Translation14 Sep 2026
- 2026Fine-Tuning Qwen3-27B for C-to-Rust Code Translation: A Three-Stage Curriculum of Pretraining, Debugging-Aware SFT, and Task-Specific SFT13 Aug 2026
- 2026Towards Reliable C-to-Rust Translation with Rule-Guided Reasoning and Reinforcement Learning22 Jul 2026
- 2026Verifier-Guided Code Translation via Meta-Step Decoding17 May 2026
- 2026Documentation-Guided Agentic Codebase Migration from C to Rust14 May 2026
- 2026ReCodeAgent: A Multi-agent Workflow for Language-Agnostic Translation and Validation of Large-Scale Repositories8 Apr 2026
- 2026His2Trans: A Knowledge-Guided Agentic Framework for Project-Level C-to-Rust Migration3 Mar 2026
- 2025SoK: Understanding (New) Security Issues Across AI4Code Use Cases20 Dec 2025
- 2025From Code Foundation Models to Agents and Applications: A Comprehensive Survey and Practical Guide to Code Intelligence23 Nov 2025