The open-source fast-anything project packages a selective alternative to rewriting an application in Rust: it profiles a program, identifies hot functions, generates a one-function Rust porting task, and can replace the original only after verification. For developers, the consequence is a workflow aimed at narrowing native-code work to a measured bottleneck rather than treating a language rewrite as the default performance project.

A profiling-first porting loop

The tool’s scan command profiles a supplied application and ranks functions using execution time and portability; port records up to 500 calls and creates a Rust crate plus TASK.md; verify builds the port and replays the captured calls. Its documented command supports Python, Node, Bun, Deno, Ruby, Java, Go, PHP, C/C++, C#, and R entry points, while the project lists language-specific support requirements and bindings. fast-anything README

The project also frames coding agents as implementers rather than arbiters. Its --agent option accepts Claude, Codex, or another command that reads a prompt from standard input, but the resulting port must still pass the tool’s checks before it can be enabled. fast-anything README

Those checks go beyond a small hand-written test set. According to the repository, verification compares recorded calls with the original function, generates edge and shrunk cases, checks errors where the original errors, and treats negative zero distinctly from zero. Every fifth recorded call, beginning with five calls, is held out from the agent’s working crate and replayed during verification. fast-anything README

Native code remains optional

enable and disable swap the Rust implementation in or out, and FAST_ANYTHING_DISABLE=1 forces execution through the original implementation. The project says it will not enable a port that fails behavioral checks or is slower per call than the source function, including cases where the boundary-crossing cost exceeds the saved computation. fast-anything README

The repository reports example end-to-end results ranging from 2.7× for C++ fuzzy deduplication to 116× for a Python fuzzy-deduplication example, with runs described as using an i5-10500 on Windows 11 except for C and C++ examples run on a four-core GitHub Actions Linux runner. These are project-reported examples, not an independent benchmark, and the repository points readers to its examples/ directory for reproduction. fast-anything README

The constraint is also the point

The approach is deliberately limited to top-level deterministic functions that accept plain data; the project documents exclusions and explains why a candidate cannot be moved. It also says it seeks to port the outermost practical loop, reducing repeated crossings into Rust rather than accelerating only an inner helper. fast-anything README

Analysis: That restriction is the project’s most credible design decision. A native replacement that cannot be isolated, replayed, and disabled creates a larger maintenance and debugging surface than the performance fix may justify. The unresolved trade-off is coverage: stateful, object-heavy, callback-driven, or otherwise non-portable bottlenecks may be precisely the functions a team most wants to improve, yet they fall outside the workflow’s stated target. fast-anything README