Source · repo
rust-anything: incremental Rust rewrites checked against recorded behaviour
Summary
rust-anything is a CLI, MCP server, and agent skill for porting an application to Rust one unit at a time. It records what the original code does, generates a Rust crate plus a bridge so callers keep the same API, and replays every recorded case against the port before the unit counts as done. It does not translate code itself: your coding agent writes the Rust, and the tool provides the safety net. MIT licence; release 2.1.0 on 2026-11-19, about 5.5k stars in its first four days (GitHub trends log, 2026-11-20).
Key points
- Install:
cargo install rust-anything(ornpm install -g rust-anything, or a prebuilt binary from Releases), thenrust-anything setup. Setup registers the MCP server and skill with Claude Code, Codex, Cursor, Gemini CLI and OpenCode, backs up each edited config as<file>.rust-anything.bak, andsetup --removeundoes it. - Claude Code plugin:
/plugin install rust-anything --marketplace erkamyaman/rust-anything(the CLI must still be onPATH). - Workflow:
recordruns the original on generated and user inputs,bridgecreates the Rust crate and binding,diffreplays all cases against the port,gatedecides whether a unit is done, andapp liftproduces a pure-Rust app once every unit passes. - Languages: TypeScript/JavaScript, Python, C, Go, Ruby, Java and Kotlin; PHP and C# only partly (analysis and whole-app record and replay).
- Good for: speeding up a hot path or a small CLI or server while proving outputs stay the same. The README's speed-ups (for example 19x on Prettier) are self-reported.
- Caution:
recordreally executes the original code, so anything that writes files, touches a database, or calls the network does so once per case. Run it on a copy with test data and no production credentials.setupedits global agent configs.
Why it matters
It turns "let the agent rewrite this in Rust" from a leap of faith into a test-driven loop: behaviour is captured first and every unit must replay identically, which is the missing piece when agents do large ports.