erkamyaman/rust-anything

rust-anything supports command-line tools, HTTP services, and libraries written in TypeScript, Python, C, Go, Ruby, and Java: it first records the original program's behavior across a large number of test cases, generates a Rust crate that preserves the original interface, allows you or a coding agent to write the Rust code, then compares results case by case, and finally produces a pure Rust program once all checks pass. In unpublished updates after 2.1.0, the package command generates publishable package structures and multi-platform build workflows for PyO3, napi, and wasm ports; fuzz uses new seeds to generate inputs and runs both the original program and the ported version simultaneously to identify inconsistencies; record --pin-clock enables recording and comparison for functions that read clocks or random numbers, and C bridging now supports structs passed by value.

rust-anything supports command-line tools, HTTP services, and libraries written in TypeScript, Python, C, Go, Ruby, and Java: it first records the original program's behavior across a large number of test cases, generates a Rust crate that preserves the original interface, allows you or a coding agent to write the Rust code, then compares results case by case, and finally produces a pure Rust program once all checks pass. In unpublished updates after 2.1.0, the package command generates publishable package structures and multi-platform build workflows for PyO3, napi, and wasm ports; fuzz uses new seeds to generate inputs and runs both the original program and the ported version simultaneously to identify inconsistencies; record --pin-clock enables recording and comparison for functions that read clocks or random numbers, and C bridging now supports structs passed by value.

Why it matters Compared to yesterday's inclusion, the newly added package command bundles validated ports into installable wheels or npm packages, while fuzz uses new inputs to detect discrepancies missed during recording.

Star count 6663 (+1571 / 24h)

Reasoning

  • 1571 stars added in the last 24 hours, total stars 6663 (indicating attention only); MIT license
  • The changelog states that demo/fuzzy-napi and demo/fuzzy-rs installed from packages pass 2000/2000 recorded test cases, and all 226447 recording calls for the newly added rational number functions in the ffmpeg port are consistent

Usage

  • Run cargo install rust-anything and rust-anything setup to install the MCP service and skills into Claude Code, Codex, Cursor, etc., then tell the agent: "Use rust-anything to rewrite this command-line tool in Rust and prove behavioral equivalence"; the new package and fuzz commands also provide MCP tools

Risks

  • The package and fuzz commands are currently listed under the "Unreleased" section of the changelog, so you must build from the repository's main branch to use them
  • record, diff, and fuzz actually execute the original code; programs involving file writes, databases, or network access should be run on copies, using test databases, and without production credentials

Open

GitHub

Explore the latest AI Radar updates