Jorge Turbica / blog · Blog ← All articles ES · Leer en español
Languages

Repo of the day: fast-anything, port only the slow 5% of your app to Rust, with proof

It profiles your Python, Node or Ruby app, your agent ports the hot functions to Rust, and nothing is swapped in unless it returns the same results.

1,920 stars and 114 forks in two days: fast-anything was created on 21 November 2026 and is already on Trendshift. Its tagline pushes back on rewrite-everything-in-Rust: "Don't rewrite it in Rust. Rewrite the 5% that's slow." Instead of porting the whole application, it measures where the time goes, has your coding agent port only those functions, and enables nothing until it has shown they return the same results.

What it is and how it works

It's a CLI written in Rust, MIT-licensed, at version 0.7.0 on npm. The loop has five steps. scan runs your app with a representative workload and ranks functions by time spent and by how portable they are. port runs it again, records up to 500 real calls to the chosen function and generates a one-function Rust crate with a TASK.md for the agent. verify builds in release mode and replays every recorded call. enable swaps the port in, and bench times the whole app, original against Rust, in interleaved runs.

Verification is the interesting part. On top of the recorded calls it derives extra cases and lets the original function answer them: NaN, infinities, -0.0, zero and ±1, non-ASCII text, empty inputs and inputs up to 16 times bigger, plus shrunk slices of the real ones. A port is enabled only if everything matches (floats within 1e-9) and errors happen where the original errored. It also stays off if it's correct but slower per call, which happens when crossing into Rust costs more than the work it saves. That's why it ports the outermost loop it can rather than the small function inside: in its own example, porting only the inner levenshtein gave 35× and 1.9×, against 116× for porting the loop.

Under the hood it uses PyO3 for Python and napi-rs for JavaScript and TypeScript. For Ruby, Java, Kotlin, Go, PHP, C, C++, C# and R it builds a library with a single C entry point that takes and returns JSON, loaded through each language's FFI (Fiddle, Java 22+'s FFM, PHP's FFI…), with no headers or extra bindings.

Getting started

You need the Rust toolchain (rustup) to build the ports:

bash
npm i -g @el4cteo/fast-anything      # or: cargo install fast-anything
fast-anything doctor                         # checks Rust, runtimes and agents
fast-anything go --agent claude -- python app.py

Or step by step:

bash
fast-anything scan -- python app.py   # profile and rank functions
fast-anything port <id>               # record calls, create the crate
fast-anything verify <id>             # release build, replay the calls
fast-anything enable <id>             # swap the port in
fast-anything bench                   # original vs Rust
FAST_ANYTHING_DISABLE=1 python app.py # run the original

--agent takes claude, codex or any command that reads a prompt on stdin; without it, you hand TASK.md to whatever tool you use. It also ships as a Claude Code plugin (/plugin marketplace add EL4CTEO/fast-anything), as an MCP server built into the binary with eight tools (fast_scan, fast_verify…) and as a skill.

Two warnings before pointing it at a real project. First, scan and port run your application and record the real arguments of each call; if the workload uses customer data, that data ends up in the recordings and in whatever the agent reads while debugging a mismatch. Use synthetic data. Second, enable edits your module by appending a marked block that does the swap; disable removes it byte for byte, but review it in the diff like any other change.

What I like and what I don't

I like that the proof doesn't depend on the agent saying it's done. The README shows a port that looked right but compared bytes instead of characters: 148 of the 500 recorded calls caught it. Refusing slower ports and falling back to the original with FAST_ANYTHING_DISABLE=1 make it reasonable to try on a branch.

What I don't: it's two days old and at 0.7.0, so it's too early to trust its maintenance. The numbers in its table (a Python fuzzy dedupe going from 4.91 s to 42 ms, a Go one from 3.02 s to 144 ms) are the repo's own examples, measured on an i5-10500 running Windows 11, on purely CPU-bound workloads. It only ports top-level, deterministic functions that take plain data: no I/O, randomness or global state, which is where many web services spend most of their time. And matching on recorded calls and their variants doesn't prove it matches on every input. For SREs there's an operational cost too: after the first port, your build, CI and images all need Rust.

fast-anything vs rust-anything

The obvious reference is rust-anything, which I covered a few days ago and which rests on the same idea: record what the original does and reject any port that doesn't reproduce it. It also profiles and moves hot loops, but it aims higher.

fast-anythingrust-anything
ScopeHot, pure functions on plain dataFrom one hot spot to the whole app (app lift)
How the port plugs inA marked block in your module, enable/disableA bridge crate with PyO3, napi-rs, cgo, JNI…
CheckingReal calls plus derived cases; drops slower portsRecorded cases, shadow in production and a gate with clippy and an unsafe audit
Languages11, including PHP, C#, Kotlin and R6, with PHP and C# in preview
LicenseMITMIT
Launch1,920 stars after two daysOver 1,300 after two days

When to use which: fast-anything if your app is fine apart from a couple of functions eating the CPU and you want to stay on Python or Node with as few new moving parts as possible; it's one command and just as quick to undo. rust-anything if the goal is leaving the original runtime, if you want to compare in production before trusting the port, or if the hot function touches more than plain data. I'd start with fast-anything's scan: it's the cheapest step and tells you whether the bottleneck is where you thought.

Sources

Jorge Turbica

Software Engineer and SRE. I write about the real challenges I run into in production.

See portfolio ↗