explainx.ai350K+ learn from us
TrendingAI News TodayExplainx for Business
Pricing
explainx.ai

Upskill in AI — 16 free pathways, live workshops & bootcamps, and 50+ courses from practitioners. Plus the skills, tools, and MCP servers to practice on.

follow us

follow on google

Add explainx.ai as a preferred source

corporate training

support@explainx.ai

get started

Find your pathTake Free Evaluation

community

Join the community

learn

mind: share how you thinkpathways — start freeworkshopsbootcampscoursescompare Explainxcertificationsmock testsexplainx universitycorporate traininglearn skills & mcp

discover

skillsmcp serversexplainx mcpestacktoolsmdx readeragentsllmsdesignsdictionarypeopleagi trackerfelony benchranks

company

aboutvisionmissionteaminstructorsteach on explainxpartnershipscommunityhackathonscareers

content

daily AI newsstate of AI — live resultsblogreleasespromptsgeneratorsresource libraryfor LLMsexplainx.ai kids

solutions

all solutionsdeveloper upskillingmarketing upskillingproduct manager upskillingleadership upskilling

newsletter · weekly

Get AI news, tools, and insights in your inbox.

supportcontactprivacytermsdata rightshow we create contentsubmission guidelines

© 2026 AISOLO Technologies Pvt Ltd

explainx.ai

On this page

  • TL;DR: commands and outcomes
  • What problem rust-anything solves
  • Languages and bridges (November 2026)
  • The agent workflow (MCP + skills)
  • Whole-app mode: CLI, HTTP servers, libraries
  • How this compares to other migration paths
  • MCP tools your agent actually calls
  • Shadow mode and production cutovers
  • Risks and honest limits
  • When rust-anything is the wrong tool
  • Stars, velocity, and what to verify locally
  • Analyze and grilling before any Rust ships
  • Quick start checklist
  • Related reading
← Back to blog

explainx / blog

rust-anything: Incremental Rust Rewrites With Recorded Behavior Parity

Rust, Developer Tools, AI Coding, MCP, Migration

Part of AI Tools and Apps

erkamyaman/rust-anything records how your TypeScript, Python, Go or Java app behaves, then gates every Rust port with diff, bench and shadow modes. MCP setup for Claude Code and Cursor.

Nov 18, 2026·9 min read·Yash Thakker
add explainx.ai
go deep
rust-anything: Incremental Rust Rewrites With Recorded Behavior Parity

erkamyaman/rust-anything is a parity-first migration harness, not a transpiler: it records what your existing app does, lets a coding agent write Rust in port.rs, and refuses to ship until diff, bench, shadow, and gate agree the new code matches. The repo gained more than 2,500 GitHub stars within days of its November 16, 2026 creation date, according to the project's trending metadata and README counters.

If you have been following AWS-style parity migrations (Kiro's PHP-to-Java engine) or agent skills that force primary sources (imozuru), rust-anything applies the same discipline to Rust: behavior is law, Rust is the optimization.

TL;DR: commands and outcomes

table · 3 cols
StepCommandWhat you get
Find heatrust-anything profile . -- node bench.mjsHot paths and call graph hints
Scaffoldrust-anything bridge . src/unit.ts --batch fn:argCrate, bindings, port.rs stub
Truth setrust-anything record rust/unit-rscases.jsonl from original
Proofrust-anything diff rust/unit-rsReplay cases against Rust
Speedrust-anything bench rust/unit-rsOriginal vs Rust timings
Safe rolloutrust-anything shadow rust/unit-rsBoth run; original answer wins
Donerust-anything gate rust/unit-rsfmt, clippy, tests, API contract
Daily briefFrom Yash · 350K+ students taught

Catch up on AI

One AI story explained in plain English, plus one thing to try. Every day, free. Unsubscribe anytime.

What problem rust-anything solves

Big-bang rewrites fail because nobody trusts the new binary. Small rewrites fail because callers break when one function changes semantics. rust-anything keeps the original API while swapping internals:

  1. Profile where time goes (not where architects guess).
  2. Bridge so TypeScript, Python, Go, Ruby, Java or C callers still invoke the same symbols.
  3. Record outputs and errors on generated edge cases plus optional test-suite captures.
  4. Diff every case against Rust before merge.
  5. Shadow in production-shaped environments so mismatches surface without user impact.
  6. Gate with clippy-deny and error-path coverage requirements.

The README claims 38,251 recorded cases replayed with zero mismatches on published demos and cites measured speedups such as 20x on an x18n sidebar search path and 17x on a Python slugify loop. Treat those as author benchmarks until you run bench on your hardware.

Green blocks crossing a bridge, illustrating rust-anything parity migration workflowGreen blocks crossing a bridge, illustrating rust-anything parity migration workflow

Languages and bridges (November 2026)

table · 3 cols
LanguageBridge techRecorder runs
TypeScript / JavaScriptnapi-rs or wasm-bindgenNode against .ts sources
PythonPyO3 (abi3)Python importing originals
Cextern "C" + ctypesShared library from .c
Gocgo + binary wireGenerated Go driver module
Rubymagnus extensionGenerated Ruby driver
JavaJNI + binary wireReflection driver
PHP (preview)Planned FFIWhole-app app record / app replay today
C# (preview)Planned P/InvokeCLI and ASP.NET via app record

Batch classes (--batch) keep collections in Rust and fan work across cores — the pattern behind demo speedups on tight loops.

Language detection reads go.mod, pom.xml, .csproj, pyproject.toml, Gemfile, composer.json, or package.json, with --lang override when repos are messy.

The agent workflow (MCP + skills)

rust-anything setup is the onboarding spine:

  • Registers rust-anything mcp as a stdio MCP server in Claude Code, Codex, Cursor, and Gemini CLI when those configs exist.
  • Installs skills/rust-anything/SKILL.md where the agent reads skills (Claude and Codex paths documented in README).
  • Backs up touched config files as *.rust-anything.bak before edits.

Claude Code users can alternatively run:

/plugin install rust-anything --marketplace erkamyaman/rust-anything

Typical agent prompts from the README:

  • "Rewrite this CLI in Rust with rust-anything, end to end, and prove it behaves the same."
  • "Profile it with rust-anything and move the hot loop to Rust."
  • "Bench the Rust port and tell me whether to ship it."

That lines up with how explainx.ai covers loop engineering for coding agents and external sandboxes: agents need machine-checkable stop conditions, not vibes.

Two pipes joined by an adapter, illustrating rust-anything bridge between original and RustTwo pipes joined by an adapter, illustrating rust-anything bridge between original and Rust

Whole-app mode: CLI, HTTP servers, libraries

Beyond single functions, rust-anything can treat programs as black boxes:

bash
rust-anything app record . -- python3 cli.py
rust-anything app replay . 
rust-anything app front-door .
rust-anything app wire . textkit --command upper
rust-anything app lift .

app record harvests cases from documented examples, --inputs JSONL, and semantic traps (unicode, overflow, missing files). Cases land as trycmd fixtures under rust/app-cases/ so humans and CI can edit them.

app front-door scaffolds a Rust binary that proxies every command to the original, tracking fallback rates.

app wire routes specific commands through gated unit crates.

app lift removes fallbacks only when replay hits zero fallback and every unit passes gate — the moral equivalent of a feature flag reaching 100% Rust.

HTTP servers follow the same story with --http, axum front doors, and route-level wiring (GET /users/{id} patterns in README).

Whole-app mode borrows grilling / research / HANDOFF practices adapted from Matt Pocock's skills: agents write ADRs in rust/DECISIONS.md, spawn research files per dependency, and leave rust/HANDOFF.md between sessions so multi-day ports do not lose state.

How this compares to other migration paths

table · 3 cols
ApproachStrengthGap rust-anything fills
Manual rewriteFull controlNo shared record of "correct" behavior
LLVM / wasm-only speedupsFast to tryHard to prove equivalence on errors and edge types
AWS Kiro parity engineEnterprise Java movesDifferent target language and cloud context
LLM "rewrite to Rust" promptsFast first draftNo enforced diff against production behavior

rust-anything is closest to test-record-replay culture in compilers and finance systems, but packaged for agentic coding with MCP tools (profile, bridge, record, diff, bench, shadow, gate, plus app commands).

MCP tools your agent actually calls

rust-anything mcp exposes the CLI as structured tools so agents do not guess shell flags. Typical surface (see repository mcp docs for the authoritative list):

table · 2 cols
Tool themePurpose for agents
profileEmit hot-path graph before anyone writes Rust
analyzeWhole-app port order, risks with file lines, dependency-to-crate map
bridgeCreate crate skeleton and foreign bindings
record / build / diffClose the proof loop on cases.jsonl
benchCompare latency including bridge overhead
shadowDual-run with production-safe answers
gateSingle pass/fail for "ship it"
app record / replay / wire / liftBlack-box CLI and HTTP migration

Agents that skip record and jump to port.rs will fail gate — by design. That is the difference between this repo and a README that says "rewrite in Rust."

Shadow mode and production cutovers

rust-anything shadow runs both implementations and returns the original answer while logging mismatches. Set RUST_ANYTHING_MODE=old|shadow|new to stage confidence:

  1. old — baseline only.
  2. shadow — Rust executes; users still see legacy output unless you inspect logs.
  3. new — Rust answers after gate and shadow periods look clean.

This mirrors feature-flag discipline in agent systems: never let the model choose when it is live.

For HTTP servers, axum front doors proxy to the legacy process until app wire moves routes. app lift is the point of no return — the README refuses lift until fallback hits zero and every unit passes gate.

Risks and honest limits

The README's "What it can't catch" section matters: recordings only cover explored input space. Concurrent behavior, performance races, and security properties need their own tests. Preview PHP and C# FFI ports are not full parity bridges yet. Agents can still hallucinate unsafe Rust — gate catches some patterns (unwrap bans, missing error paths) but not logic bugs diff never triggered.

Running setup mutates local agent configs; read diffs and keep the .bak files until you trust the install. The project disclaims Rust Foundation endorsement — comply with Rust trademark guidance if you ship branded binaries.

For teams comparing on-device agents, pair this with mobile SLM factory patterns only when your bottleneck is actually CPU in a hot loop — not API latency.

When rust-anything is the wrong tool

Skip it when the goal is greenfield Rust with no legacy contract — plain cargo new is faster. Skip it when behavior is nondeterministic (wall-clock, random IDs, live market data) unless you invest heavily in normalizers (app record supports timestamp and UUID wildcards, but someone must maintain them).

Skip it when legal requires formal verification beyond parity tests; gate is engineering rigor, not proof. In those cases, pair recorded parity with separate property tests or manual audits.

Stars, velocity, and what to verify locally

GitHub trending metadata quoted 2,505 stars gained in roughly two days from a November 16 createdAt stamp — impressive distribution, not a maturity certificate. Before you bet a quarter on it:

  1. Run diff on your worst legacy function (unicode, error branches, -0 floats).
  2. Read CHANGELOG.md for breaking CLI changes — the repo had 208 commits when we fetched.
  3. Confirm LICENSE fits your shipping model.

Trending rank tells you builders are looking; gate tells you whether your app can move.

Analyze and grilling before any Rust ships

rust-anything analyze . --whole-app is the planning phase serious teams should not skip. It emits port order as pieces (tightly coupled units move together), file:line risks (integer overflow, loose comparison, async boundaries), and a dependency-to-crate map so agents do not import the wrong Rust ecosystem crate for each library you already use.

The grilling step forces explicit decisions: naming in rust/GLOSSARY.md, ADRs in rust/DECISIONS.md, and rust/MAP.md state per unit so the next agent session does not reopen settled calls. That is borrowed from Matt Pocock's agent skills culture — the same "write decisions down" ethic we highlight in DESIGN.md templates for agent UI work.

If you are porting only one hot function, analyze without --whole-app still lists bridge type (napi vs wasm vs PyO3) so you do not pick a bridge that fights your deployment target (server vs browser vs embedded).

Quick start checklist

  1. cargo install rust-anything
  2. rust-anything setup (or install the Claude plugin after PATH is set)
  3. rust-anything profile . -- <your benchmark command>
  4. Pick one unit; bridge, record, let the agent fill port.rs, build, diff
  5. Only after gate passes, enable shadow, then cut traffic in app wire / lift

Star velocity alone does not prove production readiness — your cases.jsonl does.

Related reading

  • Loop engineering for coding agents
  • AWS Kiro PHP-to-Java parity engine
  • External sandboxes for coding agents
  • Claude Code commands reference
  • What is MCP?
  • imozuru deep-source skill

CLI flags and language preview status follow the GitHub README as of November 18, 2026.

Spotted something out of date? Let us know.
Daily briefFrom Yash · 350K+ students taught

Catch up on AI

One AI story explained in plain English, plus one thing to try. Every day, free. Unsubscribe anytime.

  • ✓ Free
  • ✓ One email a day, no spam
  • ✓ Unsubscribe anytime

People in this article

  • Matt Pocock →AI engineering and TypeScript educator
Explore people in AI →
Yash Thakker

Written by

Yash Thakker

Yash is an AI expert with over 300K learners. Join his workshops →

View Yash Thakker in People in AI →

Related posts

Nov 13, 2026

ArtCraft at AI Engineer Code: 17 Rust Crafting Apps and an Open-Source Factory Pitch

At AI Engineer Code Summit, ArtCraft CEO Brandon Thomas pitched a launcher full of open-source Rust rewrites of creative and office software, from PhotoCraft to PdfCraft, plus a future AutoCraft factory. The website and GitHub back much of the catalog; download and parity numbers are still stage claims.

Oct 9, 2026

ts-rust: An LLM-Written Rust Port of the TypeScript Compiler, Tested

The pingdotgg team ported the Go-based TypeScript 7 compiler to Rust almost entirely with LLMs. The README claims 181,711 ported tests pass and about half the type-check time of Go. It also says nobody read the code. We read the repo and the Hacker News thread.

Nov 12, 2026

Inception Mercury API Shutdown: December 28, 2026 Wind-Down

On November 12, 2026, Inception customers began reporting emails that the Mercury diffusion LLM API will wind down completely after December 28, 2026. OpenRouter routes are already gone and the Vercel AI SDK Inception provider PR closed the same day.