What Is Rust Anything? Porting an App to Rust Piece by Piece and Proving It Behaves the Same: Setup, Commands, Languages
The biggest fear of a team that wants to move the slow part of an app to a faster language, Rust, is the question "does the new version give the same result as the old one?". Rust Anything first records what the old code does (what it returns for which input, which error it raises), then has your coding agent (Claude Code, Codex, Cursor, Gemini CLI) write that piece in Rust and replays every recorded case against the new version. Nothing is switched on until every case matches and the final check (gate) passes. You can start with one slow function and go as far as turning a whole command-line tool or server into pure Rust. Free and open source; the agent's own cost is separate.
What is Rust Anything?
A free, open-source command-line tool that moves an app to Rust piece by piece with a coding agent and proves with recorded cases at every step that it behaves like the old version. It doesn't translate code itself; it measures, records, compares and decides when a port is done.
How do you install Rust Anything?
Install it with npm install -g rust-anything or cargo install rust-anything; then rust-anything setup adds it to Claude Code, Codex, Cursor, Gemini CLI and OpenCode. rust-anything doctor shows any missing runtimes.
Is Rust Anything free?
Yes. Open source under MIT or Apache 2.0; no account and no paid plan. The cost of the agent that writes the port is separate.
- What it does
- Has code ported to Rust piece by piece and proves with recordings that it behaves the same
- Type
- Command-line tool + MCP server + skill
- Languages
- TypeScript/JavaScript, Python, Go, Ruby, Java, C, C#, PHP, Kotlin, PowerShell, Swift
- Agents
- Claude Code, Codex, Cursor, Gemini CLI, OpenCode
- Latest version
- 5.1.1 (December 2, 2026); first release November 16, 2026
- Cost
- Free; MIT or Apache 2.0
What is Rust Anything for?
As an app grows, some parts slow down: a service that produces reports, a function that searches a large list, a command that processes thousands of files. Moving that part to a fast, memory-friendly language such as Rust can be the fix, but it is hard to be sure the rewritten code gives exactly the same result as the old one. Rust Anything gives you that confidence: it records the real behavior of the old code, compares the new Rust version with it on every recorded case and doesn't call the port "done" until they all match.
Who it's for: software teams and agencies dealing with performance problems. For example, a SaaS team can move its slow report-generation function to Rust on its own and match the outputs against the old version at every step; the rest of the app stays the same and the calling code keeps calling the function as before. You need terminal, git and source-language skills; you or your agent write the Rust.
What it isn't: it isn't an automatic translator. The documentation says so plainly: Rust Anything doesn't translate code itself; it supplies what an agent can't guess: where the time goes, what to port first, a bridge that keeps the old API, the exact behavior the port must match and a check that decides "done". Rust isn't always faster either: a small function called once per item can stay slower in Rust because every call crosses the bridge; the tool measures this and tells you.
Source: the README and rustanything.ai "What is rust-anything", December 2, 2026. "SaaS team" is a usage scenario.
How does Rust Anything work? Record, port, compare, switch on
disable reverts it.go run ports one unit and uses at most 3 agent turns (changed with --rounds). A whole app is one run per unit; you can stop after any of them.What "done" means: behavior matching, not your tests. An error must have the same type as in the old code (the message text isn't compared). Gate also checks whether recorded answers were pasted into the Rust code and whether stub functions were left behind. You can turn your own test suite into cases too: record --from-tests -- npx jest (or pytest) runs the old code's tests and records the calls they make.
A whole app: app record records a command-line tool (exit code, output, files written) or, with --http, a server's answer to every request. app front-door puts a Rust entry point in front of the original that hands everything not ported yet to the original; app wire moves units to Rust one at a time, app replay must stay at 100% and finally app lift leaves a pure Rust app. A forgotten webhook or email counts as a failure too: app record --effects http,smtp records outgoing calls through local stand-ins.
The maker's measurements: the version of Prettier ported to Rust went from 128.6 seconds to 6.9 seconds on 2,360 files; json-server turned into a single Rust binary dropped from 74 MB to 3.5 MB of idle memory with all 514 HTTP cases matching. These are the developer's own measurements; the gain in your code depends on the bench result.
Source: the README (How it works, Whole apps, What counts as done) and the rustanything.ai home page, December 2, 2026.
How do you use Rust Anything? What you type, what you get
There are two ways: you ask your agent in plain words (the skill and the MCP server teach the agent the steps) or you run the commands yourself. The requests below come from the examples on the official quick start page; the result depends on your project and your agent.
profile, generates a bridged Rust crate, records the behavior, writes the Rust and compares the recorded cases. In the rust/ folder you see the crate, the cases, the speed comparison and the gate result.analyze (units, readiness, risks); the skill tells the agent to present the plan for your approval and stop. If you approve, the first unit is ported and the gate result is reported.› rust-anything go -- node bench.mjs
# port src/port.rs as TASK.md says, then run the same command again› rust-anything profile . -- node bench.mjs
rust-anything bridge . src/fuzzy.ts --batch fuzzyScore:text
rust-anything record rust/fuzzy-rs && rust-anything build rust/fuzzy-rs
rust-anything diff rust/fuzzy-rs
rust-anything bench rust/fuzzy-rs
rust-anything gate rust/fuzzy-rs| Command | What it does |
|---|---|
rust-anything go -- <workload> | Profiles, bridges the hottest function, records it, has your agent port it, gates it and switches it on |
rust-anything analyze <repo> | Ranked migration plan: units, readiness, risks, dependencies |
rust-anything profile <repo> -- <workload> | Shows what is hot under a real workload |
rust-anything record <crate> | Records what the original returns, throws and prints |
rust-anything diff <crate> | Replays every recorded case against the Rust module |
rust-anything bench <crate> | Times the original and the Rust on the recorded cases, bridge included |
rust-anything gate <crate> | The definition of done |
rust-anything enable / disable <crate> | Switches callers to Rust, or back |
rust-anything app record / front-door / wire / replay / lift | Ports a whole CLI or server |
rust-anything rules <repo> --add "<kural>" | Keeps behavior you corrected as a rule; it is added to every later agent prompt |
How automatic it is per language: the go command needs profile, so it runs for TypeScript/JavaScript, Python, Go, Ruby and Java; it switches callers to Rust in place only for TypeScript/JavaScript and Python, and for the others it stops after gate and the speed measurement. PowerShell units are ported by hand step by step (bridge, record, diff, gate, enable).
Source: the README (Commands, Report or migrate) and the rustanything.ai quick start, December 2, 2026. analyze and profile only report and use no model, so they cost no tokens.
How do you install Rust Anything? npm, Cargo, Claude Code plugin
First you install the rust-anything command, then rust-anything setup adds it to the agents on your computer as an MCP server and a skill. No account or key is needed. Without a Rust toolchain, npm installs the same prebuilt binary; every GitHub release also carries binaries for macOS, Linux and Windows. The version number is this page's suggestion.
› npm install -g rust-anything@5.1.1
rust-anything setup
rust-anything doctor› cargo install rust-anything
rust-anything setup
rust-anything doctorThe repository is also a Claude Code plugin marketplace. The plugin brings the MCP server and the skill; the rust-anything command still has to be on your PATH (npm or Cargo tab first).
› claude plugin marketplace add erkamyaman/rust-anything
claude plugin install rust-anything@rust-anything› npx skills add erkamyaman/rust-anythingThis route copies only the workflow instructions; you still need rust-anything to run the commands. There is also a Codex plugin: codex plugin marketplace add erkamyaman/rust-anything, then codex plugin add rust-anything@rust-anything.
- Node 22.6+ for TypeScript, Python 3.9+ for Python and C, Go 1.22+, Ruby 3+, JDK 17+
- PHP 8+ (with the FFI extension), the .NET SDK for C#, PowerShell 7.4+, Swift 5.9+
rust-anything doctortells you what is missing and the command that fixes it
- The MSVC toolchain and Visual Studio Build Tools ("Desktop development with C++")
- C units are recorded on Windows only inside WSL
Source: the README (Quick start), docs/install.md and rustanything.ai "Set up your agent", December 2, 2026. The documentation writes npm install -g rust-anything without a version; pinning a version later is your choice.
Which languages and agents does Rust Anything work with?
| TypeScript / JavaScriptVerified | Ported end to end on ESLint, Prettier, json-server, Fuse.js, vercel/ms. |
|---|---|
| PythonVerified | CPython's colorsys (2,400/2,400 cases). |
| Go, Ruby, JavaVerified | All cases matched on Go path, Ruby shellwords and JDK 21. |
| C, C#, PHPVerified | ffmpeg's libavutil and glibc, Google.Protobuf, PEAR XML_Util. |
| Kotlin, PowerShell, SwiftTested | Tested only on the repository's own fixtures. |
| Claude CodeYes | setup adds the MCP server to ~/.claude.json and the skill to ~/.claude/skills/; there is also a plugin. |
|---|---|
| CodexYes | The MCP server goes into ~/.codex/config.toml and the skill into ~/.codex/skills/; there is also a Codex plugin. |
| CursorYes | The MCP server is added to ~/.cursor/mcp.json. |
| Gemini CLIYes | The MCP server is added to ~/.gemini/settings.json. |
| OpenCodeYes | setup adds the MCP server and the skill. |
| Other MCP clientsPartly | Add rust-anything mcp by hand as a stdio server. |
Source: the README (Languages) and rustanything.ai "Set up your agent", December 2, 2026. "Verified" means ported end to end on real code someone else wrote; "Tested" means only on the repository's fixtures. The date of every run is in docs/STATUS.md.
What does Rust Anything access? Code, network and files
- Reads your project's source code
recordandapp recordreally run the original code;diff,gateandapp replayrun the same cases again
- Everything it generates lives under
<repo>/rust/ enableadds one removable block to the original filessetupwrites to agents' settings files and leaves a.rust-anything.bakcopy next to them first
- The CLI, the MCP server and the skill send none of your code, recordings or results anywhere; no telemetry, no account
- Package managers such as Cargo, npm and pip download packages; gate fetches the RustSec advisory database when it is installed
- Your agent's model provider sees whatever your agent sends it, under its own policy
!Recording runs the real original code: code that writes files, talks to a database or calls the network does that on every case; work on a copy of the project, with a test database and no production credentials (record --sandbox cuts the network and makes the repository read-only).
Source: docs/privacy.md, SECURITY.md and the README warning, December 2, 2026. The sandbox uses sandbox-exec on macOS and bubblewrap on Linux; there is no memory limit on macOS, and according to the README the Linux path has not been run yet. These are the developer's statements and not a security certificate.
Is Rust Anything available in Turkish? Documentation and language
| DocumentationYes | There is a documentation site in Turkish at rustanything.ai/tr and a Turkish README in the repository; the docs say the English version is the most up to date. |
|---|---|
| Command outputUnclear | The documentation doesn't state the language of the CLI's messages. |
| Talking to the agentUnclear | You write the request in the language you like; the reply language depends on the agent's own support. |
What you can do: use the Turkish-language documentation site for setup and concepts; command and flag names are the same in every language. The project's README says it is developed in Turkey.
Is Rust Anything free? License and real cost
Rust Anything is free and open source; no account and no paid plan. It is offered under MIT or Apache 2.0, and you pick either. The README states it plainly: the ports and generated code in your repository are yours. The real cost is your agent's own cost (subscription or API usage): each go run uses at most 3 agent turns, while the plan and report (analyze, profile) use no model.
- Using, modifying and distributing it for free (under the MIT or Apache 2.0 terms)
- Owning the ports and code it generates
- Distributing it with the copyright and license notice of the license you chose removed
This is not legal advice; read the LICENSE-MIT and LICENSE-APACHE files for the full terms. GitHub's license label shows only Apache-2.0; the README and npm state the dual license. The README also says the project has no coin or token and that anyone selling one is not affiliated with it. Source: the README and repository files, December 2, 2026.
How do you update and uninstall Rust Anything?
- Update:
npm install -g rust-anything@latestorcargo install rust-anything, thenrust-anything setupto refresh the agent settings. - Remove from agents:
rust-anything setup --removetakes out only the entries Rust Anything added; the.rust-anything.bakcopies it saved stay until you delete them. - Uninstall the program:
npm uninstall -g rust-anythingorcargo uninstall rust-anything. - Undo a port:
rust-anything disable <crate>switches callers back to the original code; the generated files are in therust/folder.
Source: docs/install.md (Update or remove) and the README, December 2, 2026.
Frequently asked questions
Which languages does Rust Anything support?
TypeScript/JavaScript, Python, Go, Ruby, Java, C, C# and PHP are verified on real projects; Kotlin, PowerShell and Swift are tested on the repository's fixtures.
How do you port TypeScript code to Rust with Rust Anything?
rust-anything go -- <slow command> finds the hottest function, generates the bridge and records the behavior; the agent writes the Rust, and when you run the same command again and all cases match, callers switch to Rust. TypeScript needs Node 22.6 or later.
Does Rust Anything send my code anywhere?
According to the documentation, no: the tool collects no telemetry and sends no code, recordings or results. Your agent's model provider, however, sees what your agent sends it under its own policy.
Related guides
Sources
- Rust Anything GitHub (README)
- Rust Anything official site and docs
- Documentation in Turkish
- Install, update and remove (docs/install.md)
- Privacy (docs/privacy.md)
- Security reporting (SECURITY.md)
- GitHub releases
- npm: rust-anything
Not clear in the official sources: Which languages the command-line messages appear in · how mature the sandboxed recording (--sandbox) path is on Linux (the README says it has not been run yet) · what the speed gain will be in your code (only the bench result tells; the figures on this page are the maker's measurements). Each is covered in the relevant section along with what you can do.





