Rewrite Code with Evidence, Not Confidence: Inside rust-anything
When AI can generate code faster than anyone can review it, the binding constraint shifts to verification. rust-anything's record-and-diff method gives teams a concrete, automatable way to prove a migration is correct, turning 'we think it works' into 'here is the evidence'.
Rewriting a legacy system has always failed at the same point: no one can prove the new code behaves like the old code. rust-anything approaches that by treating the running original as the spec. It profiles a codebase to find hot paths, generates a bridge so a single Rust function can replace its original without stopping the system, and records real input/output pairs from that original. Those recordings become the test oracle. The tool then diffs every recorded case against the Rust output, benchmarks whether the migration actually buys speed, and gates the change through an executable 'done' check. If anything fails, a disable command rolls back to byte-identical original code.
The design deliberately separates generation from verification. AI or a developer writes the Rust; rust-anything only supplies the evidence that the rewrite is right. That division matters as AI makes code generation cheap: the scarce resource becomes the ability to validate change. The tool's author also maps the same pipeline to agent runtime problems, noting that recording prompts, replays, and evaluation gates are the same mechanics as code migration. That suggests a general 'Software Verification Runtime' pattern for anything that changes and needs to be trusted.
Verification, not generation, is the real bottleneck in AI-era software engineering; the article's central claim is that validation replaces confidence.
By separating generation from verification, rust-anything lets each side improve independently, avoiding the trap of building an auto-converting tool that must take responsibility for correctness.
The record/replay/diff/gate/rollback pipeline is structurally identical to what an agent runtime needs, which suggests a generalized runtime for trust in any changing system.
Performance gains from Rust have to be demonstrated per case; the bench step is a reminder that a rewrite's value is empirical, not assumed.