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
Why Senior Engineers Are Mostly Professional Code Deleters
0dev.to

AWS Puts the Region Inside the AS Path on Direct Connect
0dev.to AWS
How Much Does an OTT Platform Really Cost? Start With Two Budgets
0dev.to WebDev

Real Estate API MCP: One Dubai Property Search Costs an AI Agent 17,000 Tokens
0dev.to Python
Inter-AI Morality: How AI Systems Treat One Another [pdf]
0Hacker News New
Solar plane soars to 47,600 ft, on target to fly 100 hours
0Hacker News New