Fast-Anything Turns Your Coding Agent Into a Rust Surgeon, Not a Rewrite Crew
Don't rewrite the app. Profile it, hand the agent one slow function, prove the port matches 500 real calls, and keep an off switch.
Coding agents have made the oldest bad idea in software sound reasonable again. "Just rewrite it in Rust" used to mean a year of migration and a team that hated you. Now an agent can churn out thousands of lines of Rust overnight, and the temptation is to point it at the whole codebase and hope.
The trouble is that a full rewrite is mostly wasted effort. In most slow apps, a handful of functions eat most of the runtime. Rewriting the other 95% buys you new bugs and no speed.
A small open-source tool called fast-anything takes that observation seriously. Its tagline is "Don't rewrite it in Rust. Rewrite the 5% that's slow." It uses your coding agent for exactly one job, under rules the agent cannot talk its way around. The result is the most sensible pattern I have seen for letting an agent touch performance-critical code.
What fast-anything does
Fast-anything is a command-line tool that finds the slowest function in your app, has a coding agent (Claude Code, Codex, or any agent that reads a prompt) port only that function to Rust, checks the port against real calls your app made, and swaps it in. The README describes the whole thing as "One command, fully reversible."
A quick gloss on the pieces. Rust is a fast, compiled language. A profiler is a tool that watches your program run and reports where the time goes. And "swapping in" Rust means your Python or Node code calls the compiled Rust version of one function through a binding (a thin bridge between languages, such as PyO3 for Python or napi-rs for Node), while everything else stays exactly as you wrote it.
It is young. Version v0.6.0 landed on November 22, 2026, the repo had several hundred stars that day (counts differed by source), and a Hacker News post under the same tagline drew a few dozen points. MIT licensed.
How it works, step by step
The workflow is five commands, and each one exists to take a decision away from the agent.
scan picks the target. You run fast-anything scan -- python app.py and the tool profiles your app, then ranks functions by "time × how portable they are." The agent never chooses what to rewrite. The profiler does. scan also tells you why a function cannot move yet, which is useful on its own.
port builds a tiny, fenced-off job. It records up to 500 real calls to the chosen function, creates a one-function Rust project, and writes a TASK.md file describing the job. That file is what the agent gets. Not your repo, not a vague goal. One function and its contract.
verify refuses to trust the agent. It compiles the port and replays every recorded call, then adds extra cases the original function answers: edge values like NaN, infinity, negative zero, empty input, non-ASCII text and inputs up to 16 times larger than normal. The port must return "same values (floats within 1e-9), errors where the original errors." Nothing is enabled until every case matches.
There is a second gate that I did not expect. A correct port that is slower per call than the original "isn't enabled either." Calling across languages has overhead, and for small functions that overhead can cost more than the work saved. The tool checks for that instead of assuming Rust always wins.
enable and disable make it reversible. enable swaps the Rust in as "one marked block" in your code. disable removes that block "byte for byte." You can also set FAST_ANYTHING_DISABLE=1 to run the original at any time, which is the kind of escape hatch you want at 2 a.m. when something looks wrong in production.
The bug that shows why this matters
The README includes one example that sells the whole design. An agent wrote a port that "compared bytes instead of characters," a classic mistake when text contains accented letters or emoji, because one visible character can take several bytes. The code compiled. It probably looked right in review.
The recorded calls caught it: 148 of the 500 real inputs produced different answers. That is a bug a human reviewer skimming agent output could easily miss, and it surfaced because the test suite was made of the app's own traffic, not of tests the agent wrote for itself.
That is the insight worth taking away, even if you never install this tool. When an agent rewrites code, the safety comes from shrinking the job and fixing the judge in advance. The profiler picks the target, recorded reality is the spec, and the agent only gets to write the part in the middle.
What the numbers say (and whose numbers they are)
The README publishes speedups from the author's own runs, on an Intel i5-10500 under Windows 11, with C and C++ measured on a 4-core GitHub Actions Linux runner. The examples are reproducible from the repo's examples/ folder, but nobody independent has run them yet.
The headline case is a Python "fuzzy dedupe" job (finding near-duplicate names in a list of 700) that dropped from 4.91 seconds to 42 milliseconds, about 116 times faster for the whole app. TypeScript on 2,000 names went from 3.11 seconds to 155 milliseconds. PHP, Go, Ruby and C# all landed somewhere between 13 and 55 times faster on their versions of the same task.
The less flashy rows teach more. Java got only 3 times faster for the whole app, and the README explains why: "11× on the function; the rest is JVM startup." The function got fast, but the app spends time on things the port cannot touch. C and C++, already compiled languages, saw roughly 3 times.
There is a less obvious lesson about where to cut. The author notes that porting only the inner levenshtein function (the string-distance math) gave 35 times and 1.9 times, smaller wins than porting the outer loop that calls it. Moving the whole hot loop across the language boundary beat moving the innermost math, because each crossing has a cost.
Put this into practice
You need a Rust toolchain (installed through rustup), the runtime for your app's language, and a coding agent you already pay for, since Claude Code or Codex usage is billed separately from this MIT tool. Then:
npm i -g @el4cteo/fast-anything # or: cargo install fast-anything
fast-anything doctor # checks Rust, your runtimes and your agents
fast-anything scan -- python app.py # see what is slow and what can move
If scan finds a good candidate, the one-shot version runs the whole pipeline with your agent of choice:
fast-anything go --agent claude -- python app.py
Swap claude for codex, or drop --agent and hand the generated TASK.md to whatever agent you use. Claude Code users can also install it as a plugin (/plugin marketplace add EL4CTEO/fast-anything, then /plugin install fast-anything@fast-anything) or as an MCP server, a standard plug-in interface for agent tools (claude mcp add fast-anything -- fast-anything mcp).
Supported languages, per the README at v0.6.0: Python 3.10+, JavaScript and TypeScript on Node 22+, Ruby 3.3+, Java 22+, Go 1.22+, PHP 8.1+ with the FFI (foreign function interface) extension, C and C++, and C# on .NET 8+.
What to expect: the first run spends most of its time recording calls and waiting on the agent. When it finishes, run fast-anything bench to time the whole app, original against Rust, before you believe any number, and fast-anything report if you want a markdown summary for a pull request.
My suggestion for a first try: pick a batch script or background job, not your web server. Something CPU-heavy that runs on plain data, where a wrong answer shows up in a diff rather than in a customer's account.
Honest limitations
It only helps if your app is actually slow in your code. This was the top theme on Hacker News, where commenters pointed to Amdahl's law (the rule that speeding up one part can only help as much as that part's share of total time) and noted that many Node and Python apps are slow because of the network, the database or the architecture. A Rust port of a function that takes 5% of a request saves at most 5%.
It ports a narrow kind of function. Only "top-level, deterministic functions that take plain data (numbers, strings, lists, dicts, typed arrays…)" qualify. Anything that touches files, network, global state or framework objects stays where it is. That is a deliberate safety choice, and it rules out a lot of real hot paths.
500 recorded calls are not every call. The derived edge cases help, but if production sees inputs your recording session never did, the port has not been tested on them. And because those recordings are real inputs, treat them like production data if the function touches customer records.
You now own two implementations. When the Python version of that function changes, the Rust version does not change with it. Expect to re-run the pipeline after edits to anything you have swapped.
The benchmarks are the author's. One machine, the project's own examples, no independent runs yet. The current release is hours old and the repo has several hundred stars. Treat it as a promising pattern to test on a side path, not a production dependency.
Where this leaves you
The interesting thing about fast-anything is not Rust. It is the shape of the job it gives the agent: small, chosen by measurement, judged by recorded reality, and undoable with one command. That shape works for any agent rewrite, whether you port to Rust, modernize a module or swap a library.
Before you ask an agent to rewrite anything next week, ask three questions this tool answers for you. What exactly is the agent allowed to touch? What evidence decides whether its work is correct? And how do I turn it off? If you can answer all three, let the agent loose. If not, start with fast-anything scan and see what your app is actually spending its time on.
Sources: fast-anything repository and README at v0.6.0 (reviewed November 22, 2026; v0.6.0 released 2026-11-22, MIT; star counts read between about 500 and 700 depending on source); releases; Hacker News discussion.