Rust Anything Makes Your Old App Grade Its Rust Rewrite, One Piece at a Time
The Prettier port shows how a team can move some of a formatter’s work into Rust while keeping the old formatter around for the rest.

Prettier still had work to do after its Rust rewrite showed up. In the Rust Anything project’s recorded run, Rust handled 15,837 of 17,224 formatting cases by itself. The rest went back to Prettier. All 17,224 matched the old formatter byte for byte, which is a lovely result for anyone whose code review has ever been held hostage by whitespace.
The old program gets two jobs. It supplies the expected results before you change anything, and in a port like Prettier’s it can still handle work the new code hasn’t taken over. That makes the handoff less awkward. If the Rust version can handle a chunk of the job today, you can compare that chunk today. The rest of the migration can keep its appointment with next Tuesday.
The project README says the recorder “saves what it returns or throws.” That last word earns its keep. If callers expect an exception on a bad input, a rewrite that cheerfully returns an empty result has changed the deal. Rust Anything can generate a wrapper that keeps the original API in place. You write the Rust, and the checker runs the stored cases against it. Some Rust is allowed while you work out the kinks.
The project’s side-effect example is an app that “mails twice.” Two runs could return the same answer even if one sends an extra email. With effects recording enabled, the checker can compare what the app sends as well as what it returns. The README also warns that recording and replay can repeat actions such as file writes and database calls. A test run that sends real mail would certainly give the help desk something to replay.
The project also reports that its pure Rust json-server binary matched all 514 recorded HTTP cases. Prettier’s example shows a different stopping point, with the old code still taking some calls. The unanswered question for either port lives outside the tally. Which requests or inputs did nobody put through the recorder?
A team could put this to work long before it sets a date to retire the old app. Pick one slow path, record the inputs that keep it busy, and see how much work the new code can take on without changing the results. Each time somebody finds a case the recording missed, the old program can help turn that discovery into a check for the next piece. Eventually the replay cases may be the most useful thing the team keeps from the migration. Prettier, meanwhile, still has shifts.