rust-anything: Rewrite Your App in Rust, One Verified Piece at a Time — A Hands-On Test

rust-anything is a free, open-source tool that records what your app does today, then checks every piece of a Rust rewrite against that recording before it ships. It appeared on GitHub on November 16, 2026 and picked up about 4,700 stars in three days. We tested CLI version 2.0.2 on November 19, 2026, on our own code — a small fuzzy-match function we wrote for the test — running the full loop by hand, with no AI coding agent involved: record, port, build, diff, bench, gate. Every number below is what the tool actually printed.

1. What rust-anything is — and why it is hot right now

rust-anything (erkamyaman/rust-anything on GitHub, MIT licence) migrates a CLI, HTTP server or library from TypeScript/JavaScript, Python, C, Go, Ruby or Java into Rust, one piece at a time. The loop is: analyze maps the repo and ranks what to port first; bridge scaffolds a Rust crate with bindings so the rest of the app keeps calling the original API; record runs the original on generated edge cases and your own inputs and saves what it returns or throws; you (or your coding agent) write the Rust; diff replays every recorded case against the Rust port and nothing ships until they all match; gate checks the definition of done. When every unit passes with no fallback left, app lift turns it into a pure Rust app. It also ships an MCP server and a skill for Claude Code, Codex, Cursor, Gemini CLI and OpenCode — but those are optional, and this whole test was done without any of them.

The first thing to get straight, because the launch posts mostly do not: rust-anything does not write the Rust code for you. Its README says so plainly — "rust-anything does not translate code: your coding agent or you write the Rust." What it supplies is what an agent cannot guess reliably: where the time goes, what to port first and in which order, a bridge so callers keep the original API, the exact behaviour the port must match, and a gate that says when a port is done. The headline numbers on its README are the project's own claims, not ours — Prettier ported to Rust at 19x faster across 17,224 recorded runs with 0 mismatches, a whole json-server as one 5.3 MB binary using 3.5 MB of memory at idle versus 74 MB, Fuse.js search 32x faster — measured, it says, on an Apple M4. We did not reproduce those; we tested the loop itself on our own small function, which is the honest scale for a first look.

The numbers behind the surge: 4,691 GitHub stars as of November 19, 2026 — the repository was created November 16, so that is roughly 1,841 new stars a day, and it ranked #3 on GitHub's daily trending list for November 18. Google Trends backs the spike up: the term "rust-anything" sat at 0 for every week until the week of November 15, when it hit 100, and all four rising related queries are breakouts — "rust-anything github", "rust", "rust anything github", "rust anything". People are not searching for a tutorial yet; they are searching for the repository itself. That is exactly the gap this page is for: the official source, plus what actually happens when you run it.

2. Install it — the CLI first, the Rust toolchain second

The CLI itself needs no Rust at all. The fastest path is the prebuilt binary from npm (tested by us, 13 seconds):

npm install -g rust-anything
rust-anything --version   # 2.0.2
rust-anything doctor      # checks cargo, node, python3, cc, the MCP server

doctor reported cargo 1.100.0, Node v24.22.1, Python 3.12.3 and cc all OK on our Ubuntu 24.04 machine; Go, Ruby, Java, PHP and .NET showed as missing, but all are marked optional and only matter if you port from those languages. The other install path is cargo install rust-anything, and prebuilt binaries for macOS, Linux and Windows are attached to each GitHub release.

Compiling a Rust port is a different step, and it does need a toolchain. If you have no Rust installed, the official path is rustup (curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh), then rustup toolchain install stable. Two environment traps we actually hit, so you do not have to: first, rustup's own downloader timed out twice reaching static.rust-lang.org behind our egress proxy while curl fetched the same file in 1.2 seconds — we worked around it by downloading the rustc, cargo and rust-std 1.100.0 tarballs with curl (verifying each SHA-256 against the channel manifest) and installing them into the rustup toolchain directory by hand; second, cargo's first crate download failed with "transfer too slow: failed to transfer more than 10 bytes in 30s" while curl reached the same host in under a second — the fix was a ~/.cargo/config.toml with [http] timeout = 600 and low-speed-limit = 1, after which cargo fetch pulled all 43 crates. On a normal home connection you will likely never see either problem; on a proxied or slow network, these two settings are the fix. One more mundane trap: our /tmp is a 512 MB tmpfs and the toolchain extraction filled it — extract large tarballs on a real disk, not in /tmp.

Honesty box — what we did and did not run. We ran the full CLI loop on our own code (section 3). We did not run rust-anything setup — it registers the MCP server and skill with Claude Code, Codex, Cursor, Gemini CLI or OpenCode, and we have none of those agents on this machine, so registering would have been pointless configuration churn. We also did not test a real production codebase: record runs your code many times on generated inputs, and the README itself warns to run it on a copy of the project, with a test database and no production credentials. Everything below is on a 29-line function we wrote for the test.

3. Our hands-on test: one small function, the whole loop

Target: prove — on code we wrote ourselves, with answers we computed in advance — that the record → port → diff loop actually verifies behaviour, and that diff catches a real mistake instead of rubber-stamping. The test subject is fuzzyScore(query, text), a case-insensitive subsequence scorer: +1 per matched character, +2 when the match is at a word boundary (start of text, or after a space, underscore or dash), +1 when the match directly follows the previous match; -1 if the query is not a subsequence; 0 for an empty query. We computed 10 ground-truth cases with Node first (and hand-checked them — our first hand calculation was wrong on three, Node corrected us: "rust"/"rust-anything" is 9, "ra"/"rust-anything" is 6, "aa"/"banana" is 2).

Tool / version testedrust-anything 2.0.2
Rust toolchainrustc / cargo 1.100.0
RuntimeNode v24.22.1, Ubuntu 24.04
LicenceMIT
Cost$0 (no account, no agent)
Date tested2026-11-19

Test 1 — analyze: the map, with a contradictory sentence

rust-anything analyze . mapped the demo (1 package, 2 source files, 0 test files) into 2 units, both "ready" with readiness 98 — src/score.js in wave 0 and our check.js test script in wave 1 — and flagged a low-risk note about JSON round-trips on the test script. One honest oddity: the plan says "No unit is a safe first port yet" in the same breath as marking both units ready. The bridge worked fine anyway, so read that line as "no unit is pre-verified", not as a blocker.

Test 2 — bridge: CommonJS is not recognised

Our first bridge . src/score.js --kind napi failed: "unit src/score.js exports no functions". The file used CommonJS (module.exports = { fuzzyScore }), and the tool does not recognise that form. Converting to ESM (export function fuzzyScore plus "type": "module" in package.json) fixed it immediately, and the bridge generated the crate rust/score-rs with Cargo.toml, a src/port.rs stub, index.cjs, build.rs and the binding files. Two things worth knowing: if you do not pass --kind napi, the default bridge is wasm-bindgen, which needs the wasm32 target and the wasm-bindgen CLI — both absent on our machine; and the README never mentions the CommonJS limitation, so a CommonJS codebase will hit this wall first.

Test 3 — record: 98 cases, 77 of them errors

rust-anything record rust/score-rs --inputs my-cases.jsonl recorded 98 cases and reported that they ran 28 of the original's 28 lines (100% coverage). The split is the interesting part: 77 of the 98 are error cases — the generator feeds objects, arrays, booleans and null as arguments, and the function throws. The four recorded error messages were "query.toLowerCase is not a function" (60 cases), "Cannot read properties of null (reading 'length')" (9), "text.toLowerCase is not a function" (7) and "Cannot read properties of null (reading 'toLowerCase')" (1). The 21 passing cases were 9 empty-array queries (an empty array has length 0, so it returns 0 like an empty string), 2 generated string pairs ("x"/"x" → 3, "x"/"X" → 3) and our 10 hand-written cases, all with values identical to the Node ground truth. The lesson is structural: generated coverage is 100% of lines but shallow on real string behaviour — only 2 generated string cases — so the meaningful behaviour cases are the ones you supply yourself with --inputs.

Test 4 — port by hand: 57 lines of Rust, error cases included

We wrote src/port.rs ourselves (no agent), mirroring the JavaScript semantics line by line, including all four error messages as Err returns and the empty-array-returns-0 quirk. One known divergence we deliberately left visible in a code comment: JavaScript indexes strings by UTF-16 code units while Rust chars are Unicode scalar values, so a query or text containing a non-BMP character (an emoji, for example) would score differently in the two versions. No recorded case covers that, so diff cannot catch it here — a production port should iterate UTF-16 units instead.

Test 5 — build and diff: 98/98, and the bug test that proves it

rust-anything build rust/score-rs compiled the crate in 40 seconds and produced score_rs.node (napi 3.16.2, serde_json and 41 other crates). rust-anything diff rust/score-rs printed "98/98 cases match". That alone proves little — a checker that always passes is useless — so we ran a negative test: we removed the consecutive-match +1 bonus from the Rust port, rebuilt, and ran diff again. It printed "95/98 cases match" and named exactly the three cases that depend on that bonus: fuzzyScore("abc", "abc") expected 7, got 5; ("AbC", "aBc") expected 7, got 5; ("rust", "rust-anything") expected 9, got 6. Restoring the correct port brought diff back to 98/98. The checker genuinely verifies behaviour; it is not a rubber stamp.

Test 6 — bench: 2.41x on a tiny function (read the fine print)

rust-anything bench rust/score-rs timed the 98 recorded cases on both sides, bridge crossing included: JavaScript 16,157 ns/call, Rust 6,713 ns/call — a geometric mean of 2.41x, with the verdict "Ship it: every function is faster in Rust, call included." That is a real measurement, but keep it in proportion: the function is 29 lines, the sample is 98 small cases, and a 2.41x on a micro-benchmark says nothing about a real codebase. The README itself warns that calling Rust once per small function is usually slower than a JIT because of the crossing cost, and that the tool's --batch classes exist precisely for loops — data crosses once and runs over all items on all cores. Treat the 2.41x as "the loop works and the measurement is honest", not as "your app will be 2.41x faster".

Test 7 — profile and shadow: both work

rust-anything profile . -- node bench.mjs ran our 20,000-iteration workload (123 ms total, 20% in our own code) and correctly named fuzzyScore as hot (8%, 9 ms), recommending exactly the bridge command we had already run. A curiosity in the output: the workload printed "total 0" — we hand-checked the arithmetic and it is correct (the per-iteration scores for our ten test words happen to cancel out exactly), not a tool or function bug. rust-anything shadow rust/score-rs generated a drop-in module that runs the TypeScript and Rust versions side by side, switchable at runtime with RUST_ANYTHING_MODE=old|shadow|new.

Test 8 — gate: 12 checks, failed twice before passing

rust-anything gate rust/score-rs runs twelve checks: formatting, clippy, cargo test, unsafe-use comments, no unimplemented ports, size, error cases, panics, build, coverage, API exports and behaviour. Our first run failed on fmt and clippy — not because of our code, but because the toolchain we installed by hand was missing the rustfmt and clippy components. After installing those two components and running cargo fmt on the crate, the gate passed all twelve: formatted, no clippy warnings, cargo test passed, 3 unsafe uses each with a // SAFETY: comment, nothing unimplemented, 57 lines of Rust for 22 lines of JavaScript (2.6x), no unwrap/expect/panic where the original returns an error, build OK, 100% coverage, exports fuzzyScore, 98/98 cases match. Gate passed. The definition of done here is genuinely strict — formatting and linting are part of it, not an afterthought.

What we checkedResult
Install (npm CLI, no Rust needed)Passed. 2.0.2 installed in 13 seconds; doctor green on cargo, node, python3, cc.
analyze (repo map)Passed. 2 units, both ready (98); one contradictory sentence ("no safe first port") noted, not blocking.
bridge (scaffold a Rust crate)Passed, with a pitfall. CommonJS module.exports not recognised — ESM export required. Default kind is wasm-bindgen; we used --kind napi.
record (98 cases, 100% lines)Passed. 77 error cases, 21 passing; our 10 hand-written cases all matched Node exactly. Generated string coverage is thin (2 pairs) — supply your own --inputs.
build (compile the port)Passed. 40 seconds, score_rs.node built. Cargo needed a timeout config on our proxied network.
diff (98/98 + bug test)Passed. 98/98 on the correct port; a deliberate bug dropped it to 95/98 with the exact 3 failing cases named; restored to 98/98.
bench (2.41x)Passed, with a caveat. 16,157 vs 6,713 ns/call on 98 small cases. Real gains need hot loops and --batch; per-call crossing can make tiny functions slower.
profile (find the hot function)Passed. Correctly identified fuzzyScore (8%, 9 ms) and recommended the bridge command.
shadow (side-by-side module)Passed. Drop-in module generated; mode switchable with RUST_ANYTHING_MODE.
gate (12 checks)Passed. All 12 green after installing rustfmt/clippy and running cargo fmt. Strict definition of done.
Cost, account, agentPassed. $0; MIT; no account; full loop run with no AI agent at all.

Our verdict: the loop is real. The recorder, the checker and the gate all did what they claim, including the negative test — diff caught a one-line logic error with the exact failing cases. The two genuine weaknesses are coverage depth (generated string cases are thin, so you must bring your own inputs) and the rough edges for newcomers (CommonJS not recognised, wasm-bindgen as the default bridge, toolchain setup friction on proxied networks). If you have a slow TypeScript or Python function and a few hours, this is a credible way to port it with proof instead of hope.

4. What rust-anything can't do — the limits, stated plainly

5. Safety — read this before you run it on a real project

6. FAQ

Does rust-anything write the Rust code for me?

No. This is the single most misunderstood point in the launch coverage. The README states it directly: "rust-anything does not translate code: your coding agent (Claude Code, Codex, Cursor, Gemini CLI, OpenCode) or you write the Rust." The tool profiles, plans, scaffolds the bridge, records the behaviour, replays the cases, benches the result and gates the port — but port.rs is written by a human or an agent. In our test we wrote all 57 lines by hand. If you cannot write Rust and have no coding agent, the tool cannot finish the job for you.

Can I use it without Claude Code or any AI agent?

Yes. Every step in our test was run from the command line with no agent involved: analyze, bridge, record, build, diff, bench, profile, shadow and gate are all plain CLI subcommands. The agent integration (setup registering an MCP server and a skill) is an optional convenience for people who already use Claude Code, Codex, Cursor, Gemini CLI or OpenCode. You do not need a subscription to anything to use the tool.

I have never installed Rust. What do I actually need?

Two separate things. The CLI itself needs no Rust: npm install -g rust-anything gives you a prebuilt binary (13 seconds in our test). Compiling the Rust port is the second step and needs a toolchain: install rustup from rust-lang.org/tools/install, then rustup toolchain install stable (we used Rust 1.100.0). If you also want gate to pass, install the rustfmt and clippy components too — our hand-installed toolchain lacked them and gate failed on fmt and clippy until we added them. On a proxied or slow network, cargo may need a longer timeout: we set [http] timeout = 600 and low-speed-limit = 1 in ~/.cargo/config.toml.

Is it safe to run record on my real project?

Only on a copy, with test data. record executes your original code many times on generated inputs — in our tiny test that meant 98 runs, 77 of which threw type errors. On a real codebase, generated inputs will reach every branch the recorder can find, including code that writes files, sends requests or touches a database. The README's warning is explicit: run it on a copy of the project, with a test database and no production credentials in the environment. We ran it only on a disposable function we wrote for the test, and we recommend you do the same for your first run.

Does a passing diff guarantee my port is correct?

No — it guarantees the port matches the original on the recorded cases, which is a much narrower claim. Anything the recording did not cover is not checked: an input shape that never appeared, a branch the generator never hit, or a semantic difference like the UTF-16 versus Unicode-scalar string indexing we found in our own port (JavaScript counts surrogate halves, Rust counts characters — an emoji would score differently, and no recorded case caught it). The README has a "What it can't catch" section for exactly this reason. A passing diff plus a passing gate is strong evidence, not a proof; keep your own test suite as the second line of defence.

Which languages can it port? What about PHP and C#?

Unit porting works for TypeScript/JavaScript, Python, C, Go, Ruby and Java — each with its own bridge (napi-rs or wasm for JS, PyO3 for Python, cgo for Go, JNI for Java, and so on). PHP and C# are partial: whole apps can be recorded, replayed and put behind a Rust front door today, but porting individual PHP/C# units into Rust through FFI is listed as coming next. Kotlin and Swift are not supported yet. Check the repo's language table before you plan a migration — this is a fast-moving project and the table will change.

My project is CommonJS. Will bridge work?

Not as-is, in our test. bridge on a file using module.exports failed with "exports no functions"; converting the file to ESM (export function plus "type": "module" in package.json) fixed it. The README does not document this limitation. If your codebase is CommonJS, expect to convert the unit to ESM first — or watch for the project to add CommonJS support. The same advice applies to the default bridge kind: it is wasm-bindgen, so pass --kind napi for a normal Node project unless you specifically want a wasm build.

Want a slow function ported with proof, not hope?

If your app has a hot loop — a search, a formatter, a parser, a pricing calculation — the record-and-verify approach is exactly how you move it to Rust without breaking the behaviour your users depend on. Our free tools include a quote generator and a printing cost calculator built the same way: small, testable, and verified against known answers before they shipped. And if the migration is bigger than a weekend — a whole service, a checkout flow, a customer-facing tool — talk to us: we build bilingual websites and small business tools from C$699, with the same habit of testing first and claiming only what we measured.

Want it printed?

We can put your design on T-shirts, hoodies, mugs, posters and more — printed to order in Quebec, no minimums, with a free preview before you pay.

Contact us for a free quote