EL4CTEO/fast-anything

★ 1,653⑂ 105

Don't rewrite it in Rust. Rewrite the 5% that's slow: profile Python, Node or Ruby apps, port the hot functions with your coding agent, prove they behave the same.

About EL4CTEO/fast-anything

EL4CTEO/fast-anything is an open-source project on GitHub, mainly written in Rust. Don't rewrite it in Rust. Rewrite the 5% that's slow: profile Python, Node or Ruby apps, port the hot functions with your coding agent It currently holds 1,653 stars and 105 forks with 5 open issues, and was last pushed on 2026-11-22 (repository created 2026-11-21).

Project Overview

AI Homed tracks it on the Today's Trending board, currently at rank #91 with 0 new stars today.

GitHub Repository Details

Repository EL4CTEO/fast-anything · default branch main · size 969 KB · watchers 1 · source: GitHub REST API and repository README

README

https://github.com/EL4CTEO/fast-anything/blob/HEAD/fast-anything

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

https://github.com/EL4CTEO/fast-anything/blob/HEAD/EL4CTEO/fast-anything | Trendshift

https://github.com/EL4CTEO/fast-anything/blob/HEAD/npm https://github.com/EL4CTEO/fast-anything/blob/HEAD/crates.io https://github.com/EL4CTEO/fast-anything/blob/HEAD/CI https://github.com/EL4CTEO/fast-anything/blob/HEAD/Python, Node, TypeScript, Ruby, Java, Kotlin, Go, PHP, C, C++, C# https://github.com/EL4CTEO/fast-anything/blob/HEAD/Claude Code plugin https://github.com/EL4CTEO/fast-anything/blob/HEAD/MCP server https://github.com/EL4CTEO/fast-anything/blob/HEAD/MIT

Rewriting a whole app in Rust costs months, minute-long compiles and gigabytes of target/. Most of the runtime sits in a few functions anyway.

fast-anything finds those functions, has your coding agent port only them to Rust, proves the port gives the same results on real recorded calls, and swaps it in. One command, fully reversible.

https://github.com/EL4CTEO/fast-anything/blob/HEAD/fast-anything go --agent claude -- python app.py

Install

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

Ports are compiled with your Rust toolchain (rustup).

Use

fast-anything go --agent claude -- python app.py     # or: -- node app.ts / bun app.ts / deno run -A app.ts / ruby app.rb / java App.java / mvn exec:java / gradle run / go run . / php app.php / clang -O2 main.c

Or step by step:

| command | what it does | |---|---| | scan -- | profiles the app, ranks functions by time × how portable they are | | port [id] | records up to 500 real calls, creates a one-function Rust crate + TASK.md | | verify | release-builds the port and replays every recorded call | | enable / disable | swaps the Rust in or out (one marked block, removed byte for byte) | | bench | times the whole app, original vs Rust, interleaved runs | | report | markdown + SVG card for your PR | | doctor | checks Rust, your runtimes and your agents |

--agent takes claude, codex, or any command that reads a prompt on stdin. Without it, hand TASK.md to whatever you use.

Proof, not vibes

https://github.com/EL4CTEO/fast-anything/blob/HEAD/verify catches a wrong port

That port looked right but compared bytes instead of characters. 148 of 500 real calls caught it. On top of the recorded calls, fast-anything derives extra cases and lets the original answer them: edge cases (NaN, ±infinity, -0.0, zero and ±1, non-ASCII text, empty and up to 16× bigger inputs) and shrunk inputs (tiny and random slices). Nothing is enabled until every case matches: same values (floats within 1e-9), errors where the original errors. A port that is right but slower per call than the original (calling into Rust costs more than the work saved) isn't enabled either. FAST_ANYTHING_DISABLE=1 runs the original any time.

Results

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

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

fast-anything ports the outermost loop it can, not the tiny function called inside it, so the app crosses into Rust once instead of millions of times. Porting only the inner levenshtein gave 35× and 1.9×.

Why not rewrite it all?

Agents

Languages

| language | binding | status | |---|---|---| | Python 3.10+ | PyO3 | ✅ | | JavaScript / TypeScript (Node 22+, Bun, Deno 2+: bun app.ts, deno run -A app.ts) | napi-rs | ✅ | | Ruby 3.3+ | C ABI + JSON, through Ruby's built-in Fiddle | ✅ | | Java 22+ (java App.java, Maven, Gradle) | the same C bridge, through the FFM API | ✅ | | Kotlin/JVM (Gradle, src/main/kotlin, JDK 22+) | the Java bridge; top-level functions, object and companion members, extension functions | ✅ | | Go 1.22+ (go run .) | the same C bridge, through the Windows loader or dlopen (cgo) | ✅ | | PHP 8.1+ (php app.php) | the same C bridge, through PHP's FFI extension (extension=ffi) | ✅ | | C and C++ (gcc, clang or Intel oneAPI icx/icpx: clang -O2 main.c lib.c) | the same C bridge, through LoadLibrary or dlopen | ✅ | | C# / .NET 8+ (dotnet run -c Release) | the same C bridge, through NativeLibrary; profiled with EventPipe, nothing to install | ✅ |

It ports top-level, deterministic functions that take plain data (numbers, strings, lists, dicts, typed arrays…), including ones in your entry script when its main code sits under if __name__ == "__main__": (or if __FILE__ == $0, or if (import.meta.main) / if (require.main === module)). In Python that means module-level functions and @staticmethods (dataclasses, NamedTuples and numeric NumPy arrays count as plain data), in Java, C# and PHP static methods (and PHP functions), in Go plain functions, in C and C++ free functions and static methods. scan says why anything else can't move yet.

With Intel oneAPI on Windows, run fast-anything from a shell where setvars.bat ran (it sets up the linker). SYCL kernels run on the device and aren't ported; with -fsycl, only host functions are profiled and ported.

Ruby, Java, Go, PHP, C, C++ and C# need no headers, bindings or extra tools: the port is a plain Rust library with one C entry point taking and returning JSON, and fast-anything replays the recorded calls against it directly. Any language that can call C can use that bridge.

License

MIT

GitHub Stars & Activity

1,653Stars
105Forks
5Open issues
RustLanguage

GitHub Popularity

GitHub stars1,653
Forks105
Open issues5
Primary languageRust
LicenseMIT
Stars gained today0
Created2026-11-21
Last pushed2026-11-22

Trending History

Daily boardrank #91 · ▲ 0 stars
Weekly boardrank #87 · ▲ 0 stars

Related AI Projects

1

rtk-ai / rtk

Rust★ 87,593⑂ 5,627▲ 100 stars
→
2

janhq / jan

Rust★ 46,048⑂ 3,245▲ 36 stars
→
3

t8y2 / dbx

Rust★ 31,224⑂ 2,841▲ 95 stars
→
4

0xPlaygrounds / rig

Rust★ 9,238⑂ 1,030▲ 19 stars
→
5

erkamyaman / safe-anything

Rust★ 431⑂ 31
→
6

mattpocock / skills

Shell★ 331,272⑂ 27,830▲ 759 stars
→
7

obra / superpowers

Shell★ 324,910⑂ 28,822▲ 838 stars
→
8

affaan-m / ECC

JavaScript★ 309,467⑂ 45,523▲ 649 stars
→

More AI Rankings