Sulat.com / Writing on AIThursday, November 19, 2026
Developer Tools/18 November 2026

rust-anything has agents move apps to Rust piece by piece, checked against the original

Erkam Yaman's open-source rust-anything records what an app does, then checks each piece of a Rust rewrite against it. Your coding agent writes the Rust; the tool says when a piece matches.

The rust-anything crab logo as a 3D object on a workbench beside copper gears replacing steel ones, with a monitor of green checks behind

At a glance

  • Erkam Yaman's MIT-licensed rust-anything records what a TypeScript, Python, C, Go, Ruby or Java app does, then checks every ported piece of Rust against that recording until the app is pure Rust.
  • It doesn't translate code: your coding agent, such as Claude Code, Codex, Cursor or Gemini CLI, writes the Rust, while the tool supplies the profile, the bridge, the replay and a gate that says when a piece is done.
  • The README's speed figures, up to 20x on a TypeScript search and 17x on a Python function, come from moving a whole hot loop; calling Rust once per small function is usually slower than a JIT.
  • The project's own x18n case study matched 7,925 recorded cases exactly and still found the per-function ports slower, so its report recommends not shipping them.
  • A pass means the Rust matched every recorded case, and the README lists what that can't catch: unrecorded inputs, regex edge cases on non-ASCII text, run-to-run differences and anything outside the output.

Erkam Yaman, a developer based in Istanbul, has released rust-anything, an open-source tool that records what a TypeScript, Python, C, Go, Ruby or Java app does today, then checks each piece of a Rust rewrite against that recording before the next piece moves, until the whole app is Rust. Your coding agent writes the Rust. The tool supplies the profile, the plan, the replay and the check that says a piece is finished.

The first version landed on npm early on 17 November NZ time, and version 1.4.0 followed on 18 November. It’s MIT-licensed, installs from crates.io or npm, and registers itself with Claude Code, Codex, Cursor and Gemini CLI. PHP is in preview. The README says it’s an independent project, not affiliated with the Rust Project or the Rust Foundation.

How a piece moves to Rust

The README’s tagline is “Rewrite your whole app in Rust. Keep it working the whole way.” The mechanism is a loop that runs on one unit of code at a time, a file, a package or a module depending on the language.

It starts by profiling a real workload to find where the time goes, then plans the port order. A bridge crate (napi-rs or wasm-bindgen for JavaScript, PyO3 for Python, and generated wrappers for the other languages) lets the rest of the app keep calling the same API while the code underneath moves to Rust. The tool then runs the original on generated edge cases, such as emoji, NaN and negative zero, and saves what it returns or throws. Your agent writes the Rust, and every recorded case gets replayed against it.

Five-step flowchart of rust-anything: record, port, diff, shadow, gate, with RUST_ANYTHING_MODE=old as the way back
Every piece is checked against the original before it ships, and the original stays one setting away.

Two later steps cover production. In shadow mode the app runs both versions, returns the original’s answer and reports any mismatch, so Rust errors never reach callers. The gate then runs formatting, clippy with warnings denied, tests and an audit of unsafe code before it calls a piece done. Setting RUST_ANYTHING_MODE to old, shadow or new switches between the versions. The README describes that as a setting you change, not an automatic rollback.

For whole apps, the tool records a CLI or HTTP server from the outside, puts a Rust front door in front of it, and wires units in one at a time. The final app lift step strips out the fallback path and the bridges, and it refuses to run until every case passes with no fallbacks. The original code is never touched.

The speed numbers come from moving the loop

The README leads with “up to 20x faster”, and its table has six workloads. Each one has a benchmark in the repository’s demo folder, and the README says it first checks that the results match the original.

WorkloadLanguageOriginalWith rust-anything
x18n sidebar search, 50,000 keysTypeScript (Node)10 ms per query0.5 ms, 20x faster
The same search in the browser (wasm, one thread)TypeScript10 ms0.95 ms, 11.5x faster
slugify, 20,000 stringsPython98 ms17x faster
Shellwords.shellescape, 50,000 valuesRuby88 ms11.8x faster
Slugify, 50,000 stringsGo49 ms4x faster
slugify, 50,000 stringsJava43 ms3x faster
Figures from the rust-anything README, measured on four cores by its author.

Those gains come from batching. A Rust function called once per item pays the cost of crossing the language bridge each time, and the README says that’s usually slower than a JIT, the just-in-time compiler that makes Node, the JVM and Go fast. So profile finds the loop around the slow function, and --batch generates a class that takes all the items once and runs the work across every core.

Bar chart of x18n search over 50,000 keys: TypeScript 1x, Rust per key 0.2-0.4x, Rust whole loop 20x
Calling Rust once per key is slower than TypeScript; moving the whole search loop is 20x faster.

The project’s own x18n case study shows the other side. It ported all 29 functions of x18n’s core that can move without an API change. Every gate passed and 7,925 recorded cases matched exactly, but the report says the ports run slower as called from JavaScript because the bridge costs more than the work. Its recommendation for x18n: don’t ship them. In the batch table, compiled originals gain less: Go and Java run 4x and 3x faster as batches, while per-call ports ran at 0.93x and 0.68x.

What a pass doesn’t cover

The README is plain that passing means the Rust matches every recorded case and nothing more. It lists what falls outside the recording.

Checklist of four things a rust-anything pass can't see: unrecorded inputs, regexes, run-to-run changes, anything outside the output
A pass means every recorded case matched, and nothing outside the recording is checked.
  • Inputs nobody recorded. The generated cases and any inputs you supply are the ceiling, and the README suggests adding production samples and bug reports.
  • Regexes. Rust’s regex crate has no lookaround or backreferences, and a pattern that compiles can still treat \w or case-insensitive matching on non-ASCII text differently from JavaScript, Python or Java.
  • Anything that changes between runs. Hash order and concurrency differences can change for real in a port.
  • Anything not in the output. Timing, memory, and side effects other than stdout, stderr, exit codes, written files and HTTP responses, such as database and network calls, aren’t compared.

Setting it up

The README suggests pasting an install prompt into your agent, or running two commands yourself:

cargo install rust-anything
rust-anything setup

setup adds an MCP server to each agent it finds, installs a workflow skill where the agent reads skills, and saves a .rust-anything.bak copy of any settings file it changes. Prebuilt binaries for macOS, Linux and Windows are attached to each GitHub release, and npm install -g rust-anything installs the same binary. Recording and replaying run the original in its own runtime, so you need Rust plus the runtime for your language: Node 22.6 or later, Python 3.9 or later, Go 1.21 or later, Ruby 3 or later, or JDK 17 or later.

The FAQ says the tool runs locally and sends none of your code anywhere, while your agent’s model provider sees whatever your agent sends it. Porting PHP units through PHP’s FFI is the next step on the project’s issue tracker.

Sources


Discover more from Sulat AI & Tech News

Subscribe to get the latest posts sent to your email.