rust-anything 用行为校验协助增量迁移至 Rust
AI 总结
开发者 /u/erkamyaman 发布了 MIT 许可工具 rust-anything,让 Claude 将 TypeScript/JavaScript、Python、C、Go、Ruby 或 Java 应用逐步迁移为 Rust。它会记录应用行为,将每个用例运行两次,并忽略两次运行间变化的值。尚未迁移的部分会回退到原实现,迁移后的组件则必须通过格式、Lint、测试、错误路径覆盖及完整重放检查,之后才能移除回退机制。开发者称单个案例最高提速 20 倍。
深度见解
rust-anything 将 AI 辅助迁移与行为记录、重放检查及回退原实现相结合,应对自动化重写可能改变应用行为的风险。
| Asking an agent to "rewrite this in Rust" usually ends with a big diff and no idea if it still behaves the same. So I built rust-anything: Claude writes the Rust, and the tool keeps it honest. Repo: https://github.com/erkamyaman/rust-anything What it does How it works with Claude How Claude helped build it Built with Claude Code (Opus). I set the direction and made the calls; Claude did most of the work: Try it (free, MIT) Happy to answer questions, and I'd love to hear what broke for you in big rewrites that recorded cases wouldn't have caught. submitted by /u/erkamyaman [link] [comments] |