rust-anything
rust-anything records what an existing app does, helps port it to Rust piece by piece, and checks each piece against the original before moving on. It supports CLIs, servers and libraries.
Visit erkamyaman/rust-anythingOverview
rust-anything is a tool for rewriting an existing application in Rust incrementally while keeping it working. It records the behavior of the original app, supports porting CLIs, HTTP servers and libraries piece by piece, and checks each Rust port against recorded cases. The original remains the source of truth until the port passes the gate.
Key Features
- Records what the original app does and replays recorded cases against the Rust port.
- Profiles real workloads to show hot functions, callers and loops worth batching.
- Generates bridge crates and wrappers so existing callers keep the original API.
- Provides diff, bench, shadow and gate steps for behavior, performance and rollout checks.
- Supports whole-app workflows for CLIs, HTTP servers and libraries with record, replay, front-door, wire and lift commands.
- Registers an MCP server and workflow skill with Claude Code, Codex, Cursor and Gemini CLI.
Use Cases
- Port a CLI, server or library from TypeScript/JavaScript, Python, C, Go, Ruby or Java to Rust while preserving the original API.
- Move a hot loop or slow function to Rust after profiling and verify identical results.
- Plan and track a whole-app migration with units, port order, dependencies and decisions.
- Prove a Rust rewrite against recorded app cases before cutover, including HTTP routes and libraries.
Getting Started
- Install with cargo install rust-anything, then run rust-anything setup.
- For JavaScript projects, npm install -g rust-anything installs the same binary.
- Prebuilt binaries for macOS, Linux and Windows are attached to each GitHub release.
- setup registers the tool with Claude Code, Codex, Cursor and Gemini CLI and can be undone with --remove.
Deployment & Requirements
- A Rust toolchain is needed for cargo install; otherwise use prebuilt binaries or npm install -g for JavaScript projects.
- Server workflows use --http and take the port from PORT or {port} in the command.
- Other MCP clients can add rust-anything mcp as a stdio server by hand.
Before You Adopt
- License: MIT. Review its terms before using, modifying, or distributing the project.
- PHP and C# support is explicitly marked as preview.