VERT: Verified Equivalent Rust Transpilation with Large Language Models as Few-Shot Learners
Not on the map. Why?
Abstract (arXiv)
Rust is a programming language that combines memory safety and low-level control, providing C-like performance while guaranteeing the absence of undefined behaviors by default. Rust's growing popularity has prompted research on safe and correct transpiling of existing code-bases to Rust. Existing work falls into two categories: rule-based and large language model (LLM)-based. While rule-based approaches can theoretically produce correct transpilations that maintain input-output equivalence to the original, they often yield unreadable Rust code that uses unsafe subsets of the Rust language. On the other hand, while LLM-based approaches typically produce more readable, maintainable, and safe code, they do not provide any guarantees about correctness. In this work, we present VERT, a tool that can produce readable Rust transpilations with formal guarantees of correctness. VERT's only requirement is that there is Web Assembly compiler for the source language, which is true for most major languages. VERT first uses the Web Assembly compiler to obtain an oracle Rust program. In parallel, VERT uses an LLM to generate a readable candidate Rust program. This candidate is verified against the oracle, and if verification fails, we regenerate a new candidate transpilation until verification succeeds. We evaluate VERT by transpiling a suite of 1,394 programs taken from competitive programming style benchmarks. Combining Anthropic's Claude-2 and VERT increases Rust transpilations passing property-based testing from 31% to 54% and bounded model-checking from 1% to 42% compared to using Claude alone. In addition, we evaluate VERT's ability to generate non-trivial safe Rust on programs taken from real-world C projects that make significant use of pointers. Our results provide insights into the limitations of LLMs to write safe Rust.
Key facts. Cited by 20 papers in the map (data through 14 Oct 2026). First posted on arXiv 29 Apr 2024.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2024: 2; 2025: 10; 2026: 8.
20 papers.
Sort:
By area:
- 2024AlphaTrans: A Neuro-Symbolic Compositional Approach for Repository-Level Code Translation and Validationcited by 28
- 2025CRUST-Bench: A Comprehensive Benchmark for C-to-safe-Rust Transpilationcited 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
- 2025SACTOR: LLM-Driven Correct and Idiomatic C to Rust Translation with Static Analysis and FFI-Based Verificationcited by 9
- 2025Raw Pointer Rewriting with LLMs for Translating C to Safer Rustcited by 4
- 2025MatchFixAgent: Language-Agnostic Autonomous Repository-Level Code Translation Validation and Repaircited by 4
- 2025Skeleton-Guided-Translation: A Benchmarking Framework for Code Repository Translation with Fine-Grained Quality Evaluationcited by 3
- 2025Program Skeletons for Automated Program Translationcited by 3
- 2025Adversarial Agent Collaboration for Correctness Improvements of C to Safe Rust Translationcited by 3
- 2026ENCRUST: Encapsulated Substitution and Agentic Refinement on a Live Scaffold for Safe C-to-Rust Translationcited by 2
- 2025C2RUST-BENCH: A Minimized, Representative Dataset for C-to-Rust Transpilation Evaluationcited by 1
8 more
- 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
- 2026CodePivot: Bootstrapping Multilingual Transpilation in LLMs via Reinforcement Learning without Parallel Corporacited by 1
- 2025SoK: Understanding (New) Security Issues Across AI4Code Use Casescited by 0
- 2026Documentation-Guided Agentic Codebase Migration from C to Rustcited by 0
- 2026The Periodic Table of LLM Reasoning: A Structured Survey of Reasoning Paradigms, Methods, and Failure Modescited by 0
- 2026TreeAgent: A Generalizable Multi-Agent Framework for Automated Bias Labeling in Forestry via Compiled Expert Rules and Vision-Language Modelscited 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
- 2026TreeAgent: A Generalizable Multi-Agent Framework for Automated Bias Labeling in Forestry via Compiled Expert Rules and Vision-Language Models30 Jun 2026
- 2026The Periodic Table of LLM Reasoning: A Structured Survey of Reasoning Paradigms, Methods, and Failure Modes9 Jun 2026
- 2026Documentation-Guided Agentic Codebase Migration from C to Rust14 May 2026
- 2026CodePivot: Bootstrapping Multilingual Transpilation in LLMs via Reinforcement Learning without Parallel Corpora20 Apr 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
- 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
- 2025Adversarial Agent Collaboration for Correctness Improvements of C to Safe Rust Translation4 Oct 2025
- 2025MatchFixAgent: Language-Agnostic Autonomous Repository-Level Code Translation Validation and Repair19 Sep 2025
8 more
- 2025Raw Pointer Rewriting with LLMs for Translating C to Safer Rust7 May 2025
- 2025CRUST-Bench: A Comprehensive Benchmark for C-to-safe-Rust Transpilation21 Apr 2025
- 2025C2RUST-BENCH: A Minimized, Representative Dataset for C-to-Rust Transpilation Evaluation21 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
- 2025Skeleton-Guided-Translation: A Benchmarking Framework for Code Repository Translation with Fine-Grained Quality Evaluation27 Jan 2025
- 2024Syzygy: Dual Code-Test C to (safe) Rust Translation using LLMs and Dynamic Analysis18 Dec 2024
- 2024AlphaTrans: A Neuro-Symbolic Compositional Approach for Repository-Level Code Translation and Validation31 Oct 2024
- 2025From Code Foundation Models to Agents and Applications: A Comprehensive Survey and Practical Guide to Code Intelligencecited by 15
- 2025Adversarial Agent Collaboration for Correctness Improvements of C to Safe Rust Translationcited by 3
- 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
- 2026Documentation-Guided Agentic Codebase Migration from C to Rustcited by 0
- 2026Documentation-Guided Agentic Codebase Migration from C to Rust14 May 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
- 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
- 2024AlphaTrans: A Neuro-Symbolic Compositional Approach for Repository-Level Code Translation and Validationcited by 28
- 2025CRUST-Bench: A Comprehensive Benchmark for C-to-safe-Rust Transpilationcited by 19
- 2024Syzygy: Dual Code-Test C to (safe) Rust Translation using LLMs and Dynamic Analysiscited by 16
- 2025SACTOR: LLM-Driven Correct and Idiomatic C to Rust Translation with Static Analysis and FFI-Based Verificationcited by 9
- 2025Raw Pointer Rewriting with LLMs for Translating C to Safer Rustcited by 4
- 2025MatchFixAgent: Language-Agnostic Autonomous Repository-Level Code Translation Validation and Repaircited by 4
- 2025Skeleton-Guided-Translation: A Benchmarking Framework for Code Repository Translation with Fine-Grained Quality Evaluationcited by 3
- 2025Program Skeletons for Automated Program Translationcited by 3
- 2026ENCRUST: Encapsulated Substitution and Agentic Refinement on a Live Scaffold for Safe C-to-Rust Translationcited by 2
- 2025C2RUST-BENCH: A Minimized, Representative Dataset for C-to-Rust Transpilation Evaluationcited by 1
- 2025SoK: Understanding (New) Security Issues Across AI4Code Use Casescited by 0
- 2026ENCRUST: Encapsulated Substitution and Agentic Refinement on a Live Scaffold for Safe C-to-Rust Translation6 Apr 2026
- 2025SoK: Understanding (New) Security Issues Across AI4Code Use Cases20 Dec 2025
- 2025MatchFixAgent: Language-Agnostic Autonomous Repository-Level Code Translation Validation and Repair19 Sep 2025
- 2025Raw Pointer Rewriting with LLMs for Translating C to Safer Rust7 May 2025
- 2025CRUST-Bench: A Comprehensive Benchmark for C-to-safe-Rust Transpilation21 Apr 2025
- 2025C2RUST-BENCH: A Minimized, Representative Dataset for C-to-Rust Transpilation Evaluation21 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
- 2025Skeleton-Guided-Translation: A Benchmarking Framework for Code Repository Translation with Fine-Grained Quality Evaluation27 Jan 2025
- 2024Syzygy: Dual Code-Test C to (safe) Rust Translation using LLMs and Dynamic Analysis18 Dec 2024
- 2024AlphaTrans: A Neuro-Symbolic Compositional Approach for Repository-Level Code Translation and Validation31 Oct 2024