Scalable, Validated Code Translation of Entire Projects using Large Language Models
summary
An LLM-based pipeline translates whole Go repositories to Rust by partitioning code into functions/types, prompting with predefined feature mapping rules (e.g. lazy initialization, Result/anyhow error mapping, interface→trait) and validating candidates with execution snapshots from Go unit tests via differential testing and serialization. A type-driven type compatibility check rejects signatures that would crash the Rust harness. The system translates projects up to 9,700 LOC and 780 functions, reaching ~98% compilation and ~73% I/O-equivalence per-function, with concurrency unsupported and a bounded regeneration budget.
AI-written summary · about
chapters (8)
- 0:00Introduction
- 1:48Modular translation approach
- 3:53Feature mapping for constructs
- 6:21Type compatibility checks
- 10:17Execution snapshots testing
- 13:12Experimental evaluation
- 14:58Conclusion and future work
- 15:18Q&A
related talks
15mOptimizing Type Migration for LLM-Based C-to-Rust Translation: A Data Flow Graph Approach
18mChallenges in C++ to Rust Translation with Large Language Models: A Preliminary(…)
25mEvaluating An LLM's Ability To Code
15mInterleaving Large Language Models for Compiler Testing
17mRLM: Recursive Language Models for Large Codebases
23mMigrating Large-scale Scala Projects to Explicit-nulls with the Help from LLMs
34mGood or Bad Vibes? Coding with AI in Rust
45mCut Translation Costs by 50× for Millions of Product Sheets…
