mlsanityData to 14 Oct 2026

CRUST-Bench: A Comprehensive Benchmark for C-to-safe-Rust Transpilation

arXiv 2504.15254 ↗First posted 21 Apr 2025cs.SE cs.CL cs.LGcited by 19

Not on the map. Why?

Abstract (arXiv)

C-to-Rust transpilation is essential for modernizing legacy C code while enhancing safety and interoperability with modern Rust ecosystems. However, no dataset currently exists for evaluating whether a system can transpile C into safe Rust that passes a set of test cases. We introduce CRUST-Bench, a dataset of 100 C repositories, each paired with manually-written interfaces in safe Rust as well as test cases that can be used to validate correctness of the transpilation. By considering entire repositories rather than isolated functions, CRUST-Bench captures the challenges of translating complex projects with dependencies across multiple files. The provided Rust interfaces provide explicit specifications that ensure adherence to idiomatic, memory-safe Rust patterns, while the accompanying test cases enforce functional correctness. We evaluate state-of-the-art large language models (LLMs) on this task and find that safe and idiomatic Rust generation is still a challenging problem for various state-of-the-art methods and techniques. We also provide insights into the errors LLMs usually make in transpiling code from C to safe Rust. The best performing model, OpenAI o1, is able to solve only 15 tasks in a single-shot setting. Improvements on CRUST-Bench would lead to improved transpilation systems that can reason about complex scenarios and help in migrating legacy codebases from C into languages like Rust that ensure memory safety. You can find the dataset and code at https://github.com/anirudhkhatry/CRUST-bench.

Key facts. Cited by 19 papers in the map (data through 14 Oct 2026). Builds on 25 of its 36 references that are in the map. First posted on arXiv 21 Apr 2025.

Builds on

25 of 36 references.

References · 25

  1. 2021Evaluating Large Language Models Trained on Codecited by 8,320
  2. 2023Efficient Memory Management for Large Language Model Serving with PagedAttentioncited by 5,944
  3. 2021Program Synthesis with Large Language Modelscited by 3,637
  4. 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,373
  5. 2024Qwen2 Technical Reportcited by 2,120
  6. 2024LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Codecited by 2,004
  7. 2024SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineeringcited by 1,737
  8. 2023Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generationcited by 1,391
  9. 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,181
  10. 2024OpenHands: An Open Platform for AI Software Developers as Generalist Agentscited by 1,002
  11. 2021Measuring Coding Challenge Competence With APPScited by 902
  12. 2023RepoBench: Benchmarking Repository-Level Code Auto-Completion Systemscited by 353
13 more
  1. 2023Is Self-Repair a Silver Bullet for Code Generation?cited by 197
  2. 2023ClassEval: A Manually-Crafted Benchmark for Evaluating LLMs on Class-level Code Generationcited by 168
  3. 2022Multi-lingual Evaluation of Code Generation Modelscited by 159
  4. 2025CodeElo: Benchmarking Competition-level Code Generation of LLMs with Human-comparable Elo Ratingscited by 115
  5. 2024DevEval: A Manually-Annotated Code Generation Benchmark Aligned with Real-World Code Repositoriescited by 72
  6. 2024Prompting Large Language Models to Tackle the Full Software Development Lifecycle: A Case Studycited by 44
  7. 2024Towards Translating Real-World Code with LLMs: A Study of Translating to Rustcited by 35
  8. 2023Measuring The Impact Of Programming Language Distributioncited by 32
  9. 2024VERT: Verified Equivalent Rust Transpilation with Large Language Models as Few-Shot Learnerscited by 20
  10. 2025C2SaferRust: Transforming C Projects into Safer Rust with NeuroSymbolic Techniquescited by 18
  11. 2024Syzygy: Dual Code-Test C to (safe) Rust Translation using LLMs and Dynamic Analysiscited by 16
  12. 2023Ownership guided C to Rust translationcited by 13
  13. 2023TransCoder: Towards Unified Transferable Code Representation Learning Inspired by Human Skillscited by 8

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 7; 2026: 12.

19 papers.

Sort:

By area:

  1. 2025EvoC2Rust: A Skeleton-guided Framework for Project-Level C-to-Rust Translationcited by 19
  2. 2025A Comprehensive Survey on Benchmarks and Solutions in Software Engineering of LLM-Empowered Agentic Systemcited by 15
  3. 2026A Self-Evolving Framework for Efficient Terminal Agents via Observational Context Compressioncited by 15
  4. 2026SETA: Scaling Environments for Terminal Agentscited by 12
  5. 2025OSVBench: Benchmarking LLMs on Specification Generation Tasks for Operating System Verificationcited by 8
  6. 2026SWE Refactor Bench: Can Coding Agents Complete a Long-Horizon, Whole-Repository Stack Migration?cited by 5
  7. 2025MatchFixAgent: Language-Agnostic Autonomous Repository-Level Code Translation Validation and Repaircited by 4
  8. 2025Adversarial Agent Collaboration for Correctness Improvements of C to Safe Rust Translationcited by 3
  9. 2025Project-Level C-to-Rust Translation via Pointer Knowledge Graphscited by 3
  10. 2026ReCodeAgent: A Multi-agent Workflow for Language-Agnostic Translation and Validation of Large-Scale Repositoriescited by 2
  11. 2026ORBIT: Guided Agentic Orchestration for Autonomous C-to-Rust Transpilationcited by 1
  12. 2026RustMizan: A Compilable, Contamination-Aware Benchmarking Framework for Rust Vulnerabilitiescited by 1
7 more
  1. 2025SoK: Understanding (New) Security Issues Across AI4Code Use Casescited by 0
  2. 2026CangjieBench: Benchmarking LLMs on a Low-Resource General-Purpose Programming Languagecited by 0
  3. 2026Documentation-Guided Agentic Codebase Migration from C to Rustcited by 0
  4. 2026CNnotator: LLM-Guided Memory Safety Annotation Synthesiscited by 0
  5. 2026Generative Compilation: On-the-Fly Compiler Feedback as AI Generates Codecited by 0
  6. 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
  7. 2026Translator vs. Challenger: Adversarial Agentic Learning for C-to-Rust Translationcited by 0