rust-anything
Rewrite apps in Rust piece by piece, with every port checked against the original app's recorded behavior.
At a Glance
rust-anything is free and open source under the MIT license; ports and generated code in your repository are yours.
Engagement
Available On
Listed Nov 2026
About rust-anything
rust-anything is an open-source CLI and MCP server by Erkam Yaman that helps developers and coding agents rewrite an existing app in Rust and verify the port still behaves the same. It records what the original app does, then replays those cases against the Rust version before each piece is accepted. It covers CLIs, HTTP servers and libraries written in TypeScript/JavaScript, Python, C, Go, Ruby and Java.
What It Is
rust-anything is a migration and verification tool rather than a code translator. Your coding agent (Claude Code, Codex, Cursor, OpenCode and others) or you write the Rust; rust-anything supplies the surrounding workflow. That covers profiling to find hot paths, deciding what to port first, generating a bridge so callers keep the original API, and a gate that says when a port is done.
How the Record, Port, Check, Lift Loop Works
- Record:
recordruns the original on generated edge cases, semantic traps and your own inputs, and saves what it returns or throws. - Port:
bridgegenerates the Rust crate and a wrapper so callers keep the original API. - Check:
diffreplays every recorded case against the Rust, and nothing ships until all match andgatepasses. - Lift: once replay passes with no fallback and every unit passes gate,
app liftproduces a pure Rust app. The original is never touched.
The README notes it can only catch behavior the recording covers. It also warns that recording runs your original code many times, so it should be run on a copy of the project with a test database and no production credentials.
Language Support and Bridges
Bridges are generated per language: napi-rs or wasm-bindgen for TypeScript/JavaScript, PyO3 for Python, extern "C" for C, cgo for Go, magnus for Ruby and JNI for Java. PHP and C# are supported at the whole-app level (record, replay and a Rust front door), with unit-level porting listed as coming next. Batch classes let items cross into Rust once and run across all cores.
Agent Setup and Reported Results
rust-anything setup registers the MCP server and a workflow skill with Claude Code, Codex, Cursor, Gemini CLI and OpenCode, and any other MCP client can use rust-anything mcp as a stdio server. The README reports a Prettier port that is 19x faster across 17,224 recorded runs with no mismatches, and a json-server port whose 514 recorded HTTP cases all match, measured on an Apple M4.
Community Discussions
Be the first to start a conversation about rust-anything
Share your experience with rust-anything, ask questions, or help others learn from your insights.
Pricing
Open Source (MIT)
rust-anything is free and open source under the MIT license; ports and generated code in your repository are yours.
- MIT License
- Record, port (bridge), diff, gate and app lift workflow
- Supports Node.js (TypeScript/JavaScript), Python, C, Go, Ruby and Java apps
- Optional sponsorship; no paid tier
Capabilities
Key Features
- Record original app behavior on generated edge cases and custom inputs
- Generate Rust crates and bridges that preserve the original API
- Replay recorded cases against the Rust port with diff
- Gate command to confirm a port is done
- Profile to find hot loops and port order
- Benchmark Rust port against the original
- Whole-app porting with app record, app replay and app lift
- Side-effect recording such as email via --effects
- Batch classes that run across all cores
- Built-in MCP server and workflow skill for coding agents
- Supports TypeScript/JavaScript, Python, C, Go, Ruby and Java, with whole-app support for PHP and C#
