Find your next open-source project

Search by name, purpose, or keyword — or paste a GitHub repository URL

erkamyaman/rust-anything

Developer Tools

A CLI and agent skill that ports parts of JavaScript, Python, C, Go, Ruby or Java apps to Rust and verifies each unit against recorded original behavior.

2,803
227
Rust
MIT
2 days old

What it does

rust-anything supports incremental migration of an existing app to Rust rather than automatic translation. It profiles the original code, chooses units to move, generates a bridge and a Rust crate skeleton, records the original's outputs on generated edge cases plus your own inputs, and replays those cases against the Rust port. A final gate checks formatting, clippy, unsafe code, missing errors and behavioral mismatches. The Rust itself is written by you or by a coding agent; the tool owns the plan, the scaffolding and the proof.

It targets TypeScript/JavaScript, Python, C, Go, Ruby and Java, covering CLIs, HTTP servers and libraries. For Rust ports called once per item, it warns that bridge overhead can erase any speedup; its profile and --batch options instead find and move a whole hot loop into Rust, which is where the larger measured gains come from. Porting can be done unit by unit or across a whole app through app front-door, app wire and app lift.

Quick start

You need a Rust toolchain and the runtime of the language being ported (for example Node 22.6+ for TypeScript, Python 3.9+, Go 1.21+, Ruby 3+, or JDK 17+). Install from crates.io and register the agent integration:

cargo install rust-anything
rust-anything setup

setup adds an MCP server and workflow skill to Claude Code, Codex, Cursor and Gemini CLI, backing up any existing settings file first. On JavaScript projects, npm install -g rust-anything is an alternative; prebuilt binaries are attached to GitHub releases.

Then, inside a project, the core loop is:

rust-anything profile . -- node bench.mjs
rust-anything analyze .
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

Write the port in the generated port.rs (or ask your agent to), and repeat diff until every recorded case matches. See the installation notes for runtime requirements and the tool's own walkthrough for the order of steps.

Constraints

  • Passing diff and gate only proves the behavior covered by the recording. Production inputs, unrecorded side effects, and environment differences such as timing and concurrency are outside that guarantee.
  • Regex is a known weak point: Rust's regex crate lacks lookaround and backreferences, and Unicode classes and case-insensitive matching can behave differently from V8, Python or Java even when a pattern compiles. JavaScript's UTF-16 string offsets are another source of subtle mismatches.
  • Numeric code may need --float-tolerance; integer, text and structure still must match exactly.
  • Some constructs cannot cross the bridge and stay in the original language, such as TypeScript functions taking functions, generators, regex values and instanceof checks. In those cases the fallback rate stays above zero and app lift refuses to run.
  • The tool does not rewrite code automatically, and smaller per-call ports can be slower than the original despite compiling to Rust.
  • MIT licensed; generated ports in your repository remain yours.

HotRepo's take

On the new-project board for 17 November 2026, rust-anything recorded 200 stars and 89 new stars over a roughly one-hour window, with 15 forks and 8 fork gains. The repository is young and the tracked window is short, so the data only establishes early attention, not sustained traction. What is more substantial is the engineering posture in the README: the project reports its own negative result in the x18n case study, where per-call ports were slower than TypeScript, and it also documents where recordings cannot catch mismatches. That kind of self-limitation is more useful to a migration decision than a headline speedup number.

Written by AI from the project's README, updated . The project's own docs are the source of truth.

You might also like

  1. addyosmani/agent-skillsA set of Markdown workflow skills that make AI coding agents follow spec, test, review and ship discipline.JavaScript116,771
  2. juliobsz/skillsAn agent skill that turns a one-line brief into a scoring, self-reviewing website build for Claude Code and Codex users.JavaScript936
  3. samber/cc-skills-golangGo-specific agent skills that keep coding assistants aligned with idiomatic conventions, testing and debugging practice.Go3,688
  4. Moh4696/open-3d-skillsEight installable agent skills that help coding assistants build 3D and animated websites, check them in browsers, and record demos.JavaScript112
  5. caru-ini/stack-diagramAn agent skill that turns a one-sentence stack description into an architecture diagram with official logos.Python132