Don't rewrite it in Rust. Rewrite the 5% that's slow: profile your app, port the hot functions with your coding agent, prove they behave the same. Python, JS/TS, Ruby, Java, Kotlin, Go, PHP, C/C++, C#, R.

★ 4,571⑂ 324👁 8⑃ 97● 70▤ 20
下载:v0.9.0v0.9.0 ↓0.9.02026-11-27
+215
日增长
4,571
stars
324
forks
8
watchers
97
prs
70
issues
20
releases

README

Don't rewrite it in Rust. Rewrite the 5% that's slow.


  



  
  
  
  
  
  
  


Most of an app's runtime sits in a few functions. fast-anything finds them, has your coding agent port only those to Rust, proves the port returns the same results on real recorded calls, and swaps it in. Reversible, one function at a time.



 Install

sh
npm i -g @el4cteo/fast-anything       or: cargo install fast-anything


The command is fast-anything. Scanning needs only your app's runtime; porting needs Rust (rustup). fast-anything doctor checks both.

 Use

sh
fast-anything go --agent claude -- python app.py


Use the command you normally run your app with (node app.ts, go run ., gradle run, dotnet run, …). --agent takes claude, codex or any command that reads a prompt on stdin.

Step by step:

| command | what it does |
|---|---|
| scan --  | profiles the app and ranks functions by time and portability |
| port [id] | records real calls and creates a one-function Rust crate with a TASK.md |
| verify | builds the port and replays every recorded call against it |
| enable / disable | switches the Rust in or out |
| bench | times the whole app, original vs Rust, with an A/A noise control |
| report | markdown + SVG card for your PR |
| status / doctor | where things stand / what's installed |

Useful scan flags: --duration 30 for servers and GUIs, --calibrate to measure the profiler's overhead, --explain to check the setup without running. Every command takes --json.

 Proof, not vibes



- Every port is replayed against up to 500 real calls, plus edge cases (NaN, ±infinity, -0.0, empty, non-ASCII, bigger inputs) answered by the original.
- Every 5th call is held out from the agent, so a port can't special-case what it was shown.
- Nothing is enabled until all cases match, and a port that's slower per call stays off.
- FAST_ANYTHING_DISABLE=1 runs the original any time.

 Results

Real runs on an i5-10500, Windows 11 (C and C++: a GitHub Actions Linux runner). Reproduce them from examples/.

| app | before | after |
|---|---|---|
| Python fuzzy dedupe | 4.91s | 42ms, 116× |
| PHP fuzzy dedupe | 2.94s | 53ms, 55× |
| Go fuzzy dedupe | 3.02s | 144ms, 21× |
| TypeScript fuzzy dedupe | 3.11s | 155ms, 20× |
| Ruby fuzzy dedupe | 3.13s | 228ms, 14× |
| C fuzzy dedupe | 4.03s | 312ms, 13× |
| C mandelbrot | 431ms | 127ms, 3.4× |
| Java fuzzy dedupe | 3.50s | 1.18s, 3× (11× on the function; the rest is JVM startup) |
| C++ fuzzy dedupe | 3.02s | 1.09s, 2.7× |

It ports the outermost loop it can, so the app crosses into Rust once instead of millions of times.

 Languages

| language | how it's run |
|---|---|
| Python 3.10+ | python app.py (PyO3) |
| JavaScript / TypeScript | node 22+, bun, deno run -A (napi-rs) |
| Ruby 3.3+ | ruby app.rb |
| Java 22+ | java App.java, Maven, Gradle |
| Kotlin/JVM | Gradle, src/main/kotlin, JDK 22+ |
| Go 1.22+ | go run . |
| PHP 8.1+ | php app.php (FFI extension) |
| C / C++ | gcc, clang, icx/icpx |
| C / .NET 8+ | dotnet run -c Rel

Latest release

v0.9.0 v0.9.0 2026-11-27
- scan --android : ranks an Android app's own methods on a device with adb + simpleperf, with device and build metadata; the report shows it as on-device (ART) evidence (136).
- scan --explain: says what a scan would profile (language, runtime, Android modules and their layout) without running the app (136).
- scan --calibrate: times the app without the profiler and shows the profiler's overhead (142).
- scan keeps what the app printed in .fast/app.log (142).
- Node: a low-attribution scan says where the rest of the run went (164).
- README rewritten; demo GIFs show the current output.

Thanks

Snapshot: 2026-11-28T10:06:57Z · Data license Apache-2.0 · JSON