Towards Translating Real-World Code with LLMs: A Study of Translating to Rust
Not on the map. Why?
Abstract (arXiv)
Large language models (LLMs) show promise in code translation - the task of translating code written in one programming language to another language - due to their ability to write code in most programming languages. However, LLM's effectiveness on translating real-world code remains largely unstudied. In this work, we perform the first substantial study on LLM-based translation to Rust by assessing the ability of five state-of-the-art LLMs, GPT4, Claude 3, Claude 2.1, Gemini Pro, and Mixtral. We conduct our study on code extracted from real-world open source projects. To enable our study, we develop FLOURINE, an end-to-end code translation tool that uses differential fuzzing to check if a Rust translation is I/O equivalent to the original source program, eliminating the need for pre-existing test cases. As part of our investigation, we assess both the LLM's ability to produce an initially successful translation, as well as their capacity to fix a previously generated buggy one. If the original and the translated programs are not I/O equivalent, we apply a set of automated feedback strategies, including feedback to the LLM with counterexamples. Our results show that the most successful LLM can translate 47% of our benchmarks, and also provides insights into next steps for improvements.
Key facts. Cited by 35 papers in the map (data through 14 Oct 2026). First posted on arXiv 19 May 2024.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2024: 3; 2025: 22; 2026: 10.
35 papers.
Sort:
By area:
- 2024A Survey on Large Language Models for Code Generationcited by 658
- 2025CITER: Collaborative Inference for Efficient Large Language Model Decoding with Token-Level Routingcited by 30
- 2025Large Language Models for Code Generation: A Comprehensive Survey of Challenges, Techniques, Evaluation, and Applicationscited by 26
- 2024RepoTransBench: A Real-World Multilingual Benchmark for Repository-Level Code Translationcited by 23
- 2025CRUST-Bench: A Comprehensive Benchmark for C-to-safe-Rust Transpilationcited by 19
- 2025EvoC2Rust: A Skeleton-guided Framework for Project-Level C-to-Rust Translationcited by 19
- 2024Syzygy: Dual Code-Test C to (safe) Rust Translation using LLMs and Dynamic Analysiscited by 16
- 2025From Code Foundation Models to Agents and Applications: A Comprehensive Survey and Practical Guide to Code Intelligencecited by 15
- 2025Migrating Code At Scale With LLMs At Googlecited by 14
- 2025CODEMENV: Benchmarking Large Language Models on Code Migrationcited by 13
- 2025SACTOR: LLM-Driven Correct and Idiomatic C to Rust Translation with Static Analysis and FFI-Based Verificationcited by 9
- 2026Human oversight of agentic systems in practice: Examining the oversight work, challenges, and heuristics of developers using software agentscited by 6
23 more
- 2025EffiReasonTrans: RL-Optimized Reasoning for Code Translationcited by 5
- 2025EditLord: Learning Code Transformation Rules for Code Editingcited by 4
- 2025Meta-RAG on Large Codebases Using Code Summarizationcited by 4
- 2025MatchFixAgent: Language-Agnostic Autonomous Repository-Level Code Translation Validation and Repaircited by 4
- 2025ALMAS: an Autonomous LLM-based Multi-Agent Software Engineering Frameworkcited by 4
- 2025Program Skeletons for Automated Program Translationcited by 3
- 2025Adversarial Agent Collaboration for Correctness Improvements of C to Safe Rust Translationcited by 3
- 2025Project-Level C-to-Rust Translation via Pointer Knowledge Graphscited by 3
- 2025Can LLMs Replace Humans During Code Chunking?cited by 2
- 2026ENCRUST: Encapsulated Substitution and Agentic Refinement on a Live Scaffold for Safe C-to-Rust Translationcited by 2
- 2025Autonomous Legacy Web Application Upgrades Using a Multi-Agent Systemcited by 1
- 2026His2Trans: A Knowledge-Guided Agentic Framework for Project-Level C-to-Rust Migrationcited by 1
- 2026ORBIT: Guided Agentic Orchestration for Autonomous C-to-Rust Transpilationcited by 1
- 2025A Pilot Study on LLM-Based Agentic Translation from Android to iOS: Pitfalls and Insightscited by 0
- 2025Using Contrastive Learning to Improve Two-Way Reasoning in Large Language Models: The Obfuscation Task as a Case Studycited by 0
- 2025Feedback Loops and Code Perturbations in LLM-based Software Engineering: A Case Study on a C-to-Rust Translation Systemcited by 0
- 2025SoK: Understanding (New) Security Issues Across AI4Code Use Casescited by 0
- 2026Revisiting the Role of Natural Language Code Comments in Code Translationcited by 0
- 2026ParEVO: Synthesizing Code for Irregular Data: High-Performance Parallelism through Agentic Evolutioncited by 0
- 2026SemRep: Generative Code Representation Learning with Code Transformationscited by 0
- 2026LLM Translation of Compiler Intermediate Representationcited by 0
- 2026Towards Reliable C-to-Rust Translation with Rule-Guided Reasoning and Reinforcement Learningcited 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
- 2026Towards Reliable C-to-Rust Translation with Rule-Guided Reasoning and Reinforcement Learning22 Jul 2026
- 2026Human oversight of agentic systems in practice: Examining the oversight work, challenges, and heuristics of developers using software agents3 Jun 2026
- 2026LLM Translation of Compiler Intermediate Representation7 May 2026
- 2026ORBIT: Guided Agentic Orchestration for Autonomous C-to-Rust Transpilation13 Apr 2026
- 2026ENCRUST: Encapsulated Substitution and Agentic Refinement on a Live Scaffold for Safe C-to-Rust Translation6 Apr 2026
- 2026SemRep: Generative Code Representation Learning with Code Transformations13 Mar 2026
- 2026His2Trans: A Knowledge-Guided Agentic Framework for Project-Level C-to-Rust Migration3 Mar 2026
- 2026ParEVO: Synthesizing Code for Irregular Data: High-Performance Parallelism through Agentic Evolution3 Mar 2026
- 2026Revisiting the Role of Natural Language Code Comments in Code Translation23 Jan 2026
- 2025SoK: Understanding (New) Security Issues Across AI4Code Use Cases20 Dec 2025
- 2025Feedback Loops and Code Perturbations in LLM-based Software Engineering: A Case Study on a C-to-Rust Translation System2 Dec 2025
23 more
- 2025From Code Foundation Models to Agents and Applications: A Comprehensive Survey and Practical Guide to Code Intelligence23 Nov 2025
- 2025EffiReasonTrans: RL-Optimized Reasoning for Code Translation21 Oct 2025
- 2025Project-Level C-to-Rust Translation via Pointer Knowledge Graphs13 Oct 2025
- 2025Adversarial Agent Collaboration for Correctness Improvements of C to Safe Rust Translation4 Oct 2025
- 2025ALMAS: an Autonomous LLM-based Multi-Agent Software Engineering Framework3 Oct 2025
- 2025MatchFixAgent: Language-Agnostic Autonomous Repository-Level Code Translation Validation and Repair19 Sep 2025
- 2025Using Contrastive Learning to Improve Two-Way Reasoning in Large Language Models: The Obfuscation Task as a Case Study6 Sep 2025
- 2025EvoC2Rust: A Skeleton-guided Framework for Project-Level C-to-Rust Translation6 Aug 2025
- 2025Meta-RAG on Large Codebases Using Code Summarization4 Aug 2025
- 2025A Pilot Study on LLM-Based Agentic Translation from Android to iOS: Pitfalls and Insights21 Jul 2025
- 2025Can LLMs Replace Humans During Code Chunking?24 Jun 2025
- 2025CODEMENV: Benchmarking Large Language Models on Code Migration1 Jun 2025
- 2025CRUST-Bench: A Comprehensive Benchmark for C-to-safe-Rust Transpilation21 Apr 2025
- 2025Migrating Code At Scale With LLMs At Google13 Apr 2025
- 2025Program Skeletons for Automated Program Translation10 Apr 2025
- 2025SACTOR: LLM-Driven Correct and Idiomatic C to Rust Translation with Static Analysis and FFI-Based Verification16 Mar 2025
- 2025EditLord: Learning Code Transformation Rules for Code Editing10 Mar 2025
- 2025Large Language Models for Code Generation: A Comprehensive Survey of Challenges, Techniques, Evaluation, and Applications3 Mar 2025
- 2025CITER: Collaborative Inference for Efficient Large Language Model Decoding with Token-Level Routing4 Feb 2025
- 2025Autonomous Legacy Web Application Upgrades Using a Multi-Agent System31 Jan 2025
- 2024RepoTransBench: A Real-World Multilingual Benchmark for Repository-Level Code Translation23 Dec 2024
- 2024Syzygy: Dual Code-Test C to (safe) Rust Translation using LLMs and Dynamic Analysis18 Dec 2024
- 2024A Survey on Large Language Models for Code Generation1 Jun 2024
- 2025From Code Foundation Models to Agents and Applications: A Comprehensive Survey and Practical Guide to Code Intelligencecited by 15
- 2026Human oversight of agentic systems in practice: Examining the oversight work, challenges, and heuristics of developers using software agentscited by 6
- 2025ALMAS: an Autonomous LLM-based Multi-Agent Software Engineering Frameworkcited by 4
- 2025Adversarial Agent Collaboration for Correctness Improvements of C to Safe Rust Translationcited by 3
- 2025Autonomous Legacy Web Application Upgrades Using a Multi-Agent Systemcited by 1
- 2026His2Trans: A Knowledge-Guided Agentic Framework for Project-Level C-to-Rust Migrationcited by 1
- 2026ORBIT: Guided Agentic Orchestration for Autonomous C-to-Rust Transpilationcited by 1
- 2025A Pilot Study on LLM-Based Agentic Translation from Android to iOS: Pitfalls and Insightscited by 0
- 2026ParEVO: Synthesizing Code for Irregular Data: High-Performance Parallelism through Agentic Evolutioncited 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
- 2026Human oversight of agentic systems in practice: Examining the oversight work, challenges, and heuristics of developers using software agents3 Jun 2026
- 2026ORBIT: Guided Agentic Orchestration for Autonomous C-to-Rust Transpilation13 Apr 2026
- 2026His2Trans: A Knowledge-Guided Agentic Framework for Project-Level C-to-Rust Migration3 Mar 2026
- 2026ParEVO: Synthesizing Code for Irregular Data: High-Performance Parallelism through Agentic Evolution3 Mar 2026
- 2025From Code Foundation Models to Agents and Applications: A Comprehensive Survey and Practical Guide to Code Intelligence23 Nov 2025
- 2025Adversarial Agent Collaboration for Correctness Improvements of C to Safe Rust Translation4 Oct 2025
- 2025ALMAS: an Autonomous LLM-based Multi-Agent Software Engineering Framework3 Oct 2025
- 2025A Pilot Study on LLM-Based Agentic Translation from Android to iOS: Pitfalls and Insights21 Jul 2025
- 2025Autonomous Legacy Web Application Upgrades Using a Multi-Agent System31 Jan 2025
- 2025EffiReasonTrans: RL-Optimized Reasoning for Code Translationcited by 5
- 2025Using Contrastive Learning to Improve Two-Way Reasoning in Large Language Models: The Obfuscation Task as a Case Studycited by 0
- 2026Towards Reliable C-to-Rust Translation with Rule-Guided Reasoning and Reinforcement Learningcited by 0
- 2026Towards Reliable C-to-Rust Translation with Rule-Guided Reasoning and Reinforcement Learning22 Jul 2026
- 2025EffiReasonTrans: RL-Optimized Reasoning for Code Translation21 Oct 2025
- 2025Using Contrastive Learning to Improve Two-Way Reasoning in Large Language Models: The Obfuscation Task as a Case Study6 Sep 2025
- 2024A Survey on Large Language Models for Code Generationcited by 658
- 2025CITER: Collaborative Inference for Efficient Large Language Model Decoding with Token-Level Routingcited by 30
- 2025Large Language Models for Code Generation: A Comprehensive Survey of Challenges, Techniques, Evaluation, and Applicationscited by 26
- 2024RepoTransBench: A Real-World Multilingual Benchmark for Repository-Level Code Translationcited by 23
- 2025CRUST-Bench: A Comprehensive Benchmark for C-to-safe-Rust Transpilationcited by 19
- 2025EvoC2Rust: A Skeleton-guided Framework for Project-Level C-to-Rust Translationcited by 19
- 2024Syzygy: Dual Code-Test C to (safe) Rust Translation using LLMs and Dynamic Analysiscited by 16
- 2025Migrating Code At Scale With LLMs At Googlecited by 14
- 2025CODEMENV: Benchmarking Large Language Models on Code Migrationcited by 13
- 2025SACTOR: LLM-Driven Correct and Idiomatic C to Rust Translation with Static Analysis and FFI-Based Verificationcited by 9
- 2025EditLord: Learning Code Transformation Rules for Code Editingcited by 4
- 2025Meta-RAG on Large Codebases Using Code Summarizationcited by 4
12 most cited of 22 All 22 (JSON)
- 2026LLM Translation of Compiler Intermediate Representation7 May 2026
- 2026ENCRUST: Encapsulated Substitution and Agentic Refinement on a Live Scaffold for Safe C-to-Rust Translation6 Apr 2026
- 2026SemRep: Generative Code Representation Learning with Code Transformations13 Mar 2026
- 2026Revisiting the Role of Natural Language Code Comments in Code Translation23 Jan 2026
- 2025SoK: Understanding (New) Security Issues Across AI4Code Use Cases20 Dec 2025
- 2025Feedback Loops and Code Perturbations in LLM-based Software Engineering: A Case Study on a C-to-Rust Translation System2 Dec 2025
- 2025Project-Level C-to-Rust Translation via Pointer Knowledge Graphs13 Oct 2025
- 2025MatchFixAgent: Language-Agnostic Autonomous Repository-Level Code Translation Validation and Repair19 Sep 2025
- 2025EvoC2Rust: A Skeleton-guided Framework for Project-Level C-to-Rust Translation6 Aug 2025
- 2025Meta-RAG on Large Codebases Using Code Summarization4 Aug 2025
- 2025Can LLMs Replace Humans During Code Chunking?24 Jun 2025
- 2025CODEMENV: Benchmarking Large Language Models on Code Migration1 Jun 2025
12 newest of 22 All 22 (JSON)