What is rust-anything?
rust-anything is an MIT-licensed command-line tool, MCP server and agent skill for rewriting an existing application in Rust one piece at a time. It records what the original program does, generates the bridge that lets the rest of the code call a Rust replacement with the same API, and checks every ported piece against the recording before it is switched on. The project states plainly that it does not translate code: a coding agent such as Claude Code or Codex, or a developer, writes the Rust, and rust-anything supplies profiling, port order, bindings, recorded behavior and a definition of done. It is written in Rust and maintained by the independent developer Erkam Yaman on GitHub. The README notes that it is not affiliated with or endorsed by the Rust Project or the Rust Foundation.
Source projects can be CLIs, HTTP servers and libraries in TypeScript or JavaScript, Python, C, Go, Ruby, Java and Kotlin. The calls between the original language and Rust are carried by existing binding projects: napi-rs or wasm-bindgen for Node.js, PyO3 (abi3) for Python, extern "C" functions for C, cgo for Go, a magnus extension for Ruby and JNI for Java and Kotlin. PHP and C# are supported for whole-app recording, replay and a Rust front door only; porting their individual units is listed as the next step. The status page separates languages verified on real third-party code from those covered only by the project's own test fixtures.
Distribution: cargo install rust-anything from crates.io, npm install -g rust-anything from the npm package (Node.js 18 or later, same binary), or prebuilt archives for macOS (arm64, x64), Linux (x64, arm64) and Windows (x64) attached to each GitHub release. rust-anything setup registers the MCP server, and the workflow skill where the agent reads skills, with Claude Code, Codex, Cursor, Gemini CLI and OpenCode. The same MCP server and skill are also packaged as a Claude Code plugin and a Codex plugin from marketplaces in the repository, and the server is listed in the official MCP Registry.
The repository was created on November 16, 2026, and the project moved from 1.0.0 to 3.0.0 within its first six days. The current release is v3.0.0 (November 21, 2026), which matches the npm and crates.io version. It added the package command, which turns a gated port into installable maturin wheels or napi-rs per-platform npm packages and turns a whole Node CLI into an npm package that runs the Rust binary and falls back to the pinned original; a live differential fuzz command; record --pin-clock for code that reads the clock or random numbers; C bridge support for scalar structs passed by value; and an ESLint 10.15.0 port published on npm as eslint-rs. A v3.1.0 tag and changelog entry adding a go command, which profiles a slow command and ports its hottest function, existed on November 21, 2026 without a published release.
The project documents real ports with measured results in real-world.md, including Prettier 3.6.2 (17,224 of 17,224 recorded runs byte-identical, 15,861 of them answered fully in Rust), json-server lifted to a single Rust binary (514 of 514 recorded HTTP cases), Fuse.js, vercel/ms and ten units of ffmpeg's libavutil (226,447 recorded calls). The author notes that calling Rust once per small function is often slower than a JIT runtime and that against C the gain is memory safety rather than speed. Everything runs locally: according to the privacy note, the CLI, MCP server and skill send no code, recordings or results anywhere, collect no telemetry and need no account. Similar agent-driven Rust tooling on iThub includes Craft Anything, which rebuilds the visible behavior of websites, apps and games rather than porting source code.
Key capabilities
- Record, port, check, lift loop The core workflow has four stages:
recordruns the original and saves what it returns or throws,bridgegenerates the Rust crate and a wrapper with the original API,diffreplays every recorded case against the Rust, andapp liftremoves the original once every unit passes. The original source is never modified. The full loop with profiling, analysis, benchmarking and shadowing is described in How it works. - Behavior recording with semantic traps
recordcalls each function on generated edge cases such as non-ASCII text, emoji,-0,NaNand integers where floats are expected, plus traps for string length and case, signed division, overflow edges, float printing and map or sort order. Results are stored incases.jsonl.--from-testsalso records every call made by the original's own Jest or pytest suite, and--inputsadds real inputs. - Differential checks and fuzzing
diffreplays recorded cases against the built Rust, called the way the original's callers call it, and lists mismatches.fuzz, new in 3.0.0, generates fresh inputs from a new seed, runs them through both versions and reports what the recording missed;--keepappends mismatching cases so later checks include them. - Gate as definition of done
gaterunscargo fmt, clippy with warnings as errors, tests, anunsafeaudit, a check that nothing is left unported, a recorded failing case for every error path of the original, a ban onunwrap,expectorpanic!where the original returns an error, the build, the API and recorded behavior. It also fails when the port grows beyond three times the original's lines plus 50. - Profiling and analysis
profileruns a real workload under the language's profiler (Node CPU profiles, cProfile, Go pprof, JFR or a Ruby tracer) and reports hot functions, callers and loops worth batching.analyzeplans units and port order, lists risks with file and line, maps dependencies to crates and marks hardware-facing C as code to keep in C. - Generated language bridges
bridgecreates a crate withlib.rs, the wrapper the source language loads andport.rsstubs to fill in. Bridges use napi-rs or wasm-bindgen for TypeScript and JavaScript (classes and async included), PyO3 abi3 for Python,extern "C"with the original names for C, typed cgo for Go, magnus for Ruby and typed JNI for Java and Kotlin. - Batching for hot loops For every language except C,
--batch fn:paramgenerates a class that keeps many values in Rust so items cross the bridge once and each call runs over all of them on all cores. The README states that this is how the Fuse.js port reached 2.8 ms per query over 50,000 strings, down from 91.2 ms. - Shadow mode and switching
shadowcreates a drop-in module that runs both implementations, returns the original's result and reports mismatches, controlled withRUST_ANYTHING_MODE=old|shadow|new. This lets a port run beside the original in production before it answers on its own. - Whole-app front door and lift For whole CLIs and servers,
app recordcaptures stdout, stderr, exit codes, written files and HTTP responses,app front-doorgives Rust the entry point while the original answers everything not yet ported,app wireswitches units on as they pass, andapp liftproduces a pure Rust app.app replay --buildcan also check a rewrite in any language against the recording, as described in Port a whole app. - Side-effect recording
app record --effects http,smtpruns local fakes and records outgoing webhooks, API calls and email per case, and--db-resetand--db-dumpreset the database before each case and record its state afterwards. A rewrite that prints the same output but sends an email twice fails replay. HTTPS calls through the proxy show only the host, and message queues or signals are not compared. - Clock and random pinning
record --pin-clock(TypeScript or JavaScript with the napi bridge, and Python) fixes the current time, time zone and random numbers during record, diff, fuzz and gate. The port reads the same values from a generatedpinned.rs, so code that reads the clock or callsMath.randomcan be recorded and compared. - Packaging ports for users
packagelays out a gated port as packages end users install: maturin abi3 wheels for PyO3 ports, napi-rs per-platform npm packages with a fallback to the original JavaScript, a single npm package for wasm ports, and npm packages for whole Node CLI front doors. Generated GitHub Actions workflows build macOS, Linux and Windows targets; the status page notes these workflows had not yet run at release time. - MCP server with 18 tools
rust-anything mcpis a stdio MCP server exposing every step as a tool, fromanalyze,bridge,record,diffandgatetoapp_record,app_wireandapp_lift, plus two prompts,port_unitandport_whole_app. Each tool's parameters and what it may touch are listed in the tools reference. - Workflow skill for long ports The bundled skill guides an agent through a port, and its whole-app variant asks the user about decisions in rounds, records them as ADRs in
rust/DECISIONS.md, keeps a unit map inrust/MAP.mdand arust/HANDOFF.mdbetween sessions, and writes an interactiverust/cutover.shfor steps such as deploys and DNS. The documentation credits Matt Pocock's skills as the source of these practices. - Agent setup command
rust-anything setupadds the MCP server to Claude Code, Codex, Cursor, Gemini CLI and OpenCode, and installs the skill for Claude Code, Codex and OpenCode. It keeps other settings, saves a.rust-anything.bakcopy before changing a file unless--no-backupis passed, andsetup --removetakes out only its own entries. Any other MCP client can addrust-anything mcpby hand. - Installation and requirements Install with
cargo install rust-anything,npm install -g rust-anythingor a prebuilt release binary for macOS, Linux or Windows. Recording and diffing run the original in its own runtime: Node 22.6 or later for TypeScript (Node 24 forprofile), Python 3.9 or later for Python and C, Go 1.21+, Ruby 3+ and JDK 17+, plus a C compiler for C. Windows uses the MSVC Rust target with Visual Studio Build Tools, as described in the install guide. - Android profile for Kotlin
build --profile androidbuilds the JNI library with the Android NDK forarm64-v8a,armeabi-v7aandx86_64with 16 KB page alignment, andrecordanddiffwith the same profile run the Kotlin unit under ART on a connected device. The profile covers logic units only; UI, lifecycle and SDK-only classes stay in Kotlin, and the status page lists it as tested on fixtures rather than verified on a real project. - Published ports The ESLint port is installable as
npm install -g eslint-rs: it answers runs covered by its 90 ported rules in Rust and hands everything else to ESLint 10.15.0, pinned as a dependency. Binaries exist for macOS and Linux; on Windows it runs ESLint itself. The Prettier 3.6.2 port is packaged the same way asprettier-rsbut is not published on npm.
Where rust-anything fits
Moving one slow function to Rust
A project with one hot path runs profile on a real workload, then bridge on the file with --batch for the loop the profiler points at. After the agent or developer writes port.rs, record, build, diff and bench show whether the Rust matches and whether it is faster with the bridge cost included, and gate decides when the port is done. The rest of the code keeps calling the same function name.
Rewriting a whole CLI or HTTP server
For a full rewrite, analyze --whole-app plans units, dependencies and decisions, app record captures the program from the outside, and app front-door puts a Rust entry point in front that initially forwards every case to the original. Units are then ported and wired one at a time while the fallback rate drops, and app lift produces a pure Rust binary once replay passes with no fallback. The project's json-server case study took nine units and 514 recorded HTTP cases.
Agent-driven ports in Claude Code, Codex or OpenCode
After setup, a user can ask the agent to rewrite a CLI, profile a slow search or plan the migration of a folder, and the agent calls the MCP tools and follows the skill. rust-anything supplies the recorded behavior and the pass or fail checks, while the agent writes the Rust. Hosts such as Codex CLI and OpenCode are registered by the same command.
Checking a rewrite that was written another way
app record and app replay only run programs, so a rewrite in Go, or one written by hand, can be checked against the original's recorded arguments, stdin, files and HTTP traffic with app replay --build "./app-go". The unit tools and lift remain specific to Rust.
Catching side effects in services
Services that send email, call webhooks or write to a database can be recorded with --effects http,smtp and --db-reset or --db-dump. Replay then fails a rewrite that returns the same output but sends different messages or writes different rows. The README warns that recording calls the original many times, so it should run on a copy of the project with a test database and no production credentials.
Shipping a port to end users
Once a port passes gate, package generates Python wheels or per-platform npm packages that fall back to the original where no binary fits, and RUST_ANYTHING_MODE=old switches back to the original implementation. The ESLint and Prettier front doors in the repository are examples of this packaging. The project lists its known blind spots, including unrecorded inputs, regex differences, float formatting and cross-platform behavior, in What it can't catch.
Install
cargo install rust-anything && rust-anything setupReviews of rust-anything
Be the first to share your experience with rust-anything.
Write a review
Loading review form…
Found rust-anything useful? Upvote it todayYour vote helps other IT teams find it in the daily ranking.






