AI & ML
Req2Rust: A Requirements-Guided Agent Harness for Project-Level C++-to-Rust Migration
arXiv cs.SE0 views
arXiv:2611.07442v1 Announce Type: new Abstract: Memory-safety concerns make Rust an attractive target for modernizing legacy C/C++ systems, yet project-level C++ migration must balance semantic fidelity with Rust-oriented reconstruction. Source-structure-preserving migration can track low-level behavior, but it can also carry source-language organization, unsafe idioms, and project assumptions into Rust. Direct agent-based translation gives the model more freedom to construct a Rust project, but semantic coverage depends on the model identifying the source behaviors that must be preserved. This problem is especially acute for C++, where source behaviors are often hidden in object models, destructor-driven lifetime protocols, and other hard-to-localize C++ semantics. This paper presents Req2Rust, the first project-level LLM-based C++-to-Rust migration harness. Req2Rust first derives an evidence-grounded Migration Requirements Specification (MRS) that records the behaviors and constraints that must be preserved. It then synthesizes a Rust Design Specification (RDS) and realizes it as an initial Rust project. Because real projects contain implementation details and idioms that only become visible during build and validation, Req2Rust treats the initial Rust project as an executable refinement state. Compiler, semantic, and unsafe-reduction validators produce validation reports for improving buildability, behavioral alignment, and unsafe usage. We evaluate Req2Rust on general C++ projects and modules from the large-scale Openharmony codebase against a ClaudeCode baseline. Req2Rust produces buildable Rust crates in both settings and improves test pass rate from 69.5% to 91.9% on general projects and from 45.4% to 87.9% on Openharmony modules.
Source:https://arxiv.org/abs/2611.07442PreviousTake It From Here: Evaluating Coding Agents On Project TakeoverNextRoute Before Response: Fail-Closed Routing for LLM-Enabled Customer-Service Software
Related posts
Best AI tools to add vocals to your own beat (2026)
0dev.to

How to Keep Product Information in Sync Across a Multilingual Website
0dev.to
UK Warns Its Critical Infrastructure Faces Grave Risk
0Dark Reading
We tested memory retrieval on DolphinBench. Plain keyword search exposed our own regression.
0dev.to
Global stocks tumble as AI panic grips markets after Democrats' midterm success
0Hacker News
Turning GPT GIFs into a cat film: what smoothing fixed, and what it didn’t
0dev.to AI