
fast-anything
Open SourceAutomatically and verifiably rewrite only the slow 5% in Rust
AI Summary
fast-anything is a CLI tool that helps developers find performance bottlenecks in their applications and automatically port them to Rust – without rewriting the entire app. It profiles the code, uses an AI agent (e.g. Claude or Codex) to port only the slow functions, and proves correctness through replay of real-world calls. It targets developers looking to achieve significant speedups in Python, JavaScript, TypeScript, Ruby, Java, Kotlin, Go, PHP, C/C++, C#, or R.

✓ Pros
- +Supports 10+ languages with native bindings (PyO3, napi-rs, FFI)
- +Automatic verification through replay of up to 500 real-world calls ensures correctness
- +Reversible: the Rust port can be toggled on or off at any time via the enable/disable command
✗ Cons
- −Porting is limited to deterministic top-level functions with simple data types
- −The Rust toolchain (rustup) must be installed locally, raising the barrier to entry
Use Cases
- →Performance optimization of Python scripts without a full Rust migration
- →Automated porting of bottleneck functions in JS/TS Node.js apps to Rust
- →CI/CD integration for measurable runtime improvements with A/A noise control
- →Android app profiling with simpleperf via adb for method-level analysis
Who is it for?
Developers who want to accelerate specific performance hotspots in their application using native Rust bindings, without a complete rewrite.
Tags
What is fast-anything?
fast-anything is a CLI tool that automatically identifies the slow parts of an application and ports them to Rust. The core idea follows the well-known 80/20 principle: typically, a handful of functions consume the vast majority of runtime. fast-anything profiles the code, isolates these hotspots, and delegates the porting work to an AI agent (Claude or Codex). The rest of the codebase remains untouched.
The tool supports over ten languages, including Python, JavaScript, TypeScript, Ruby, Java, Kotlin, Go, PHP, C/C++, C#, and R. Integration with the respective host code is handled via native bindings: PyO3 for Python, napi-rs for Node.js, and FFI for other languages. For Android applications, profiling can be performed at the method level using simpleperf via adb.
Core Features
- Automatic profiling: Determines which functions actually dominate runtime before any code is touched.
- AI-assisted porting: Passes only the identified bottleneck functions to a configurable LLM agent for Rust translation.
- Verification via replay: Tests the ported function against up to 500 recorded real-world calls to ensure inputs and outputs remain identical.
- Reversibility: The Rust port can be activated or deactivated at any time using the
enableanddisablecommands, without modifying the codebase. - CI/CD integration: Supports A/A noise control for measurable runtime improvements in automated pipelines.
Who is fast-anything for?
The tool is aimed at developers who have identified or suspect a specific runtime bottleneck but are not looking to migrate their entire codebase to Rust. Typical scenarios include a Python data processing script that becomes too slow with large datasets, or a Node.js API where a single function is driving latency.
Developers without Rust experience can still benefit – the tool handles binding generation automatically. However, the Rust toolchain must be installed locally via rustup. Those who have never set this up before will spend their initial time doing so rather than profiling.
Another limitation concerns the scope of porting: it only works for deterministic top-level functions with simple data types. Functions with side effects, complex object graphs, or external dependencies are out of scope.
Context & Alternatives
fast-anything sits in the performance optimization space, specifically at the intersection of profiler and code generator. Classic profilers like py-spy (Python) or perf (Linux) provide analysis but handle no porting. Manually writing Rust extensions with PyO3 or napi-rs is the direct alternative, but requires Rust expertise and significantly more effort.
The distinguishing feature of fast-anything is its verification layer. Replay-based correctness checking using real call data is not a common standard in this category of tools. Developers who do not want to blindly trust an AI-generated Rust port get a concrete mechanism here that puts trust on a measurable foundation.




