Rewrite in Rust without the leap of faith
rust-anything records what your app actually does, then refuses to let your Rust port ship until it matches, case by case.

What it does
It profiles your Node, Python, C, Go, Ruby or Java app to find the hot code, plans a port order, and generates the bridge (napi-rs, PyO3, cgo, JNI, magnus) so callers keep the original API. Then it records the original’s behavior on edge cases — emoji, -0, NaN, signed division — and replays every recorded case against the Rust port. Nothing ships until diff and gate pass. It does not translate code; your coding agent (or you) writes the Rust, and rust-anything supplies what an agent can’t guess: what to port, in what order, and proof it behaves the same.
The interesting bit The honesty is the feature. The README admits that calling Rust once per small function is usually slower than a JIT — the tool’s job is finding the loop worth moving, and moving it. It also states plainly that it can only catch what the recording covers, with a whole section on what it can’t catch.
Key highlights
- Works as an MCP server plus a skill for Claude Code, Codex, Cursor and Gemini CLI;
setupregisters it with each and--removeundoes it cleanly. - Benchmarks with receipts: 20x on a 50,000-key TypeScript search, 17x on Python
slugify, 11.8x on Ruby’sShellwords— each with a demo that first checks identical results. - Batch classes (
--batch) keep many values in Rust and run over all cores, instead of paying the FFI toll per call. - Whole-app mode: a Rust front door takes the entry point, units port one at a time behind it, and
app liftends in pure Rust proved by replay. - PHP and C# are in preview — recordable and replayable today, with FFI/P/Invoke porting still on the roadmap.
Caveats
- Equivalence is only as good as the recording; behavior the cases don’t cover can still diverge.
- The speedups are the project’s own benchmarks on 4 cores — real workloads will vary, and small per-call functions may not gain at all.
- It’s glue plus tooling around your agent doing the actual porting; if you don’t use a coding agent, you’re doing more of the work yourself.
Verdict Worth a look if you have a slow hot path or a whole app you’ve been itching to move to Rust but couldn’t justify the risk. If your code is already compiled (numba, Cython, JAX) or fast enough, the tool itself flags that Rust gains little — believe it.
Frequently asked
- What is erkamyaman/rust-anything?
- rust-anything records what your app actually does, then refuses to let your Rust port ship until it matches, case by case.
- Is rust-anything open source?
- Yes — erkamyaman/rust-anything is open source, released under the MIT license.
- What language is rust-anything written in?
- erkamyaman/rust-anything is primarily written in Rust.
- How popular is rust-anything?
- erkamyaman/rust-anything has 7.5k stars on GitHub.
- Where can I find rust-anything?
- erkamyaman/rust-anything is on GitHub at https://github.com/erkamyaman/rust-anything.