
Description
When an app gets slow, "rewrite it in Rust" sounds tempting until you count the cost: months of work, minute-long compiles and a
The part that earns trust is the proof step. Before porting, it records what the function actually receives and returns during real runs; afterwards it replays every one of those calls against the Rust version and adds generated edge cases such as NaN, infinities, non-ASCII text, empty input and much larger inputs. A single mismatch keeps the port switched off. In the project's own example, a Python fuzzy dedupe script over 700 names went from 4.91 s to 42 ms, 116x faster. That is one measured benchmark, and your gain depends on where your hot spots are.
One command, start to finish:
Ranked by time and portability:
Outer loops first: it ports the outermost function it can, so the app crosses into Rust once instead of millions of times through a tiny inner helper, which usually pays off far less.
Replay on real calls:
Slower ports stay off: if the Rust version is correct but slower per call, because crossing languages costs more than it saves, it is not enabled.
Fully reversible:
Interleaved benchmarks:
Fast builds, easy cleanup: each port is a one-function crate that compiles in seconds, all ports share one
Many languages: Python via PyO3, JavaScript and TypeScript (Node, Bun, Deno) via napi-rs, and Ruby, Java, Kotlin, Go, PHP, C, C++, C# and R through a small C entry point that passes JSON, with no extra headers or binding tools.
Works with your agent:
Servers and GUIs too: for programs that never exit on their own,
target folder measured in gigabytes. Yet most of the runtime usually lives in a handful of functions. fast-anything takes the narrow route and rewrites only the slow 5%: it profiles your program, picks the functions worth moving, has Claude Code or Codex port just those to Rust, checks that they behave the same, and swaps them in while the rest of your code stays untouched.The part that earns trust is the proof step. Before porting, it records what the function actually receives and returns during real runs; afterwards it replays every one of those calls against the Rust version and adds generated edge cases such as NaN, infinities, non-ASCII text, empty input and much larger inputs. A single mismatch keeps the port switched off. In the project's own example, a Python fuzzy dedupe script over 700 names went from 4.91 s to 42 ms, 116x faster. That is one measured benchmark, and your gain depends on where your hot spots are.
Features
One command, start to finish:
fast-anything go --agent claude -- python app.py profiles, records calls, has the agent write Rust, builds, verifies, swaps it in and times the result, ending with how much faster the whole app runs.Ranked by time and portability:
scan lists each function's share of runtime and call count, and marks which to port, which are already covered by an outer function, and which can't move yet and why.Outer loops first: it ports the outermost function it can, so the app crosses into Rust once instead of millions of times through a tiny inner helper, which usually pays off far less.
Replay on real calls:
port records up to 500 real calls and verify release-builds the port and replays them all. Floats must agree within 1e-9, and wherever the original throws, the port has to throw too.Slower ports stay off: if the Rust version is correct but slower per call, because crossing languages costs more than it saves, it is not enabled.
Fully reversible:
enable and disable add or remove one marked block, removed byte for byte, and FAST_ANYTHING_DISABLE=1 runs the original whenever you want.Interleaved benchmarks:
bench alternates original and Rust runs to time the whole app end to end, and report writes Markdown plus an SVG card for your pull request.Fast builds, easy cleanup: each port is a one-function crate that compiles in seconds, all ports share one
.fast/target cache, and fast-anything clean wipes it.Many languages: Python via PyO3, JavaScript and TypeScript (Node, Bun, Deno) via napi-rs, and Ruby, Java, Kotlin, Go, PHP, C, C++, C# and R through a small C entry point that passes JSON, with no extra headers or binding tools.
Works with your agent:
--agent accepts claude, codex or any command that reads a prompt on stdin. The repo also ships as a Claude Code and Codex plugin marketplace, a built-in MCP server with 8 tools, and a skill, or you can hand the generated TASK.md to whatever tool you prefer.Servers and GUIs too: for programs that never exit on their own,
scan --duration 30 samples for a while and then stops them.

