Lune

ICSE2025顶会

RustAssistant: Using LLMs to Fix Compilation Errors in Rust Code

Pantazis Deligiannis, Akash Lal, Nikita Mehrotra, Rishi Poddar, Aseem Rastogi

摘要

The Rust programming language, with its safety guarantees, has established itself as a viable choice for low-level systems programming language over the traditional, unsafe alternatives like C/C++. These guarantees come from a strong ownership-based type system, as well as primitive support for features like closures, pattern matching, etc., that make the code more concise and amenable to reasoning. These unique Rust features also pose a steep learning curve for programmers. This paper presents a tool called RustAssistant that leverages the emergent capabilities of Large Language Models (LLMs) to automatically suggest fixes for Rust compilation errors. RustAssistant uses a careful combination of prompting techniques as well as iteration between an LLM and the Rust compiler to deliver high accuracy of fixes. RustAssistant is able to achieve an impressive peak accuracy of roughly 74% on real-world compilation errors in popular open-source Rust repositories. We also contribute a dataset of Rust compilation errors to enable further research.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 5 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Scalable, Validated Code Translation of Entire Projects using Large Language Models 引用了 Automated Program Repair in the Era of Large Pre-trained Language Models
  • Chain-of-Thought Prompting Elicits Reasoning in Large Language Models 引用了 Training language models to follow instructions with human feedback
  • Automated Program Repair in the Era of Large Pre-trained Language Models 引用了 CURE: Code-Aware Neural Machine Translation for Automatic Program Repair
  • Automated Program Repair in the Era of Large Pre-trained Language Models 引用了 A syntax-guided edit decoder for neural program repair
  • Cpp2Rust: Automatic Translation of C++ to Safe Rust 引用了 Scalable, Validated Code Translation of Entire Projects using Large Language Models
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper5

  1. Scalable, Validated Code Translation of Entire Projects using Large Language ModelsHanliang Zhang, Cristina David, Meng Wang, Brandon Paulsen 等PLDI 2025 · 15 次引用
  2. Type-Constrained Code Generation with Language ModelsNiels Mündler, Jingxuan He, Hao Wang, Koushik Sen 等PLDI 2025 · 10 次引用
  3. Cpp2Rust: Automatic Translation of C++ to Safe RustLucian Popescu, Francisco Gouveia, Henrique Preto, João Silveira 等PLDI 2026 · 1 次引用
  4. Automated Modernization of Machine Learning Engineering Notebooks for ReproducibilityBihui Jin, Kaiyuan Wang, Pengyu NieISSTA 2026
  5. Unlocking a New Rust Programming Experience: Fast and Slow Thinking with LLMs to Conquer Undefined BehaviorsRenshuang Jiang, Pan Dong, Zhenling Duan, Yu Shi 等DAC 2025

它引用的 Paper13

  1. Training language models to follow instructions with human feedbackLong Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida 等NeurIPS 2022 · 24,707 次引用
  2. Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsJason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma 等NeurIPS 2022 · 22,562 次引用
  3. Automated Program Repair in the Era of Large Pre-trained Language ModelsChunqiu Steven Xia, Yuxiang Wei, Lingming ZhangICSE 2023 · 321 次引用
  4. CURE: Code-Aware Neural Machine Translation for Automatic Program RepairNan Jiang, Thibaud Lutellier, Lin TanICSE 2021 · 267 次引用
  5. A syntax-guided edit decoder for neural program repairQihao Zhu, Zeyu Sun, Yuan-an Xiao, Wenjie Zhang 等FSE 2021 · 214 次引用

相关 Paper

  1. Rust-doctor: Enhanced Feature for Rust Ownership and Lifetime Repair with Balanced Training Data GenerationWenzhang Yang, Xiaoning Ren, Cuifeng Gao, Yinxing XueEMNLP Findings 2025
  2. RustAssure: Differential Symbolic Testing for LLM-Transpiled C-to-Rust CodeYubo Bai, Tapti PalitASE 2025 · 8 次引用
  3. Aliasing Limits on Translating C to Safe RustMehmet Emre, Peter Boyland, Aesha Parekh, Ryan Schroeder 等OOPSLA 2023 · 32 次引用
  4. VERT: Polyglot Verified Equivalent Rust Transpilation with Large Language ModelsAidan Z. H. Yang, Yoshiki Takashima, Brandon Paulsen, Josiah Dodds 等ASE 2025 · 1 次引用
  5. HarnessLLM: Rust Verification Harness Generation with Large Language ModelsMinghua Wang, Yuwei Liu, Lin HuangICSE 2026
黄昏的海面,两侧是细线勾勒的悬崖