Skip to content
Back to search

fast-anything

MarketplaceWorks with Claude CodeGitHub

fast-anything: port your app's hottest functions to Rust and prove they behave the same.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/el4cteo--fast-anything/badge.svg)](/listings/el4cteo--fast-anything)

HTML

<a href="/listings/el4cteo--fast-anything"><img src="/api/listings/el4cteo--fast-anything/badge.svg" alt="findsafeskills safety rating" /></a>

Install

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

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

Ports are compiled with your Rust toolchain ([rustup](https://rustup.rs)).

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

.claude-plugin/marketplace.json · Manifest · 14 lines
  1. {
  2. "name": "fast-anything",
  3. "owner": {
  4. "name": "EL4CTEO"
  5. },
  6. "plugins": [
  7. {
  8. "name": "fast-anything",
  9. "source": "./",
  10. "description": "Port your app's hottest functions to Rust and prove they behave the same."
  11. }
  12. ],
  13. "description": "fast-anything: port your app's hottest functions to Rust and prove they behave the same."
  14. }
README.md · README · 104 lines
  1. <p align="center">
  2. <img src="https://raw.githubusercontent.com/EL4CTEO/fast-anything/main/docs/assets/wordmark.png" alt="fast-anything" width="520">
  3. </p>
  4. <p align="center"><b>Don't rewrite it in Rust. Rewrite the 5% that's slow.</b></p>
  5. <p align="center">
  6. <a href="https://www.npmjs.com/package/@el4cteo/fast-anything"><img src="https://img.shields.io/npm/v/@el4cteo/fast-anything?color=f74c00&label=npm" alt="npm"></a>
  7. <a href="https://crates.io/crates/fast-anything"><img src="https://img.shields.io/crates/v/fast-anything?color=f74c00" alt="crates.io"></a>
  8. <a href="https://github.com/EL4CTEO/fast-anything/actions/workflows/ci.yml"><img src="https://github.com/EL4CTEO/fast-anything/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
  9. <img src="https://img.shields.io/badge/Python%20%C2%B7%20Node%20%C2%B7%20TypeScript%20%C2%B7%20Ruby%20%C2%B7%20Java%20%C2%B7%20Go%20%C2%B7%20PHP%20%C2%B7%20C%20%C2%B7%20C%2B%2B-2563eb" alt="Python, Node, TypeScript, Ruby, Java, Go, PHP, C, C++">
  10. <img src="https://img.shields.io/badge/Claude%20Code-plugin-d97757" alt="Claude Code plugin">
  11. <img src="https://img.shields.io/badge/MCP-server-555" alt="MCP server">
  12. <a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-555" alt="MIT"></a>
  13. </p>
  14. 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.
  15. **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.
  16. <p align="center"><img src="https://raw.githubusercontent.com/EL4CTEO/fast-anything/main/docs/assets/demo.gif" alt="fast-anything go --agent claude -- python app.py" width="820"></p>
  17. ## Install
  18. ```sh
  19. npm i -g @el4cteo/fast-anything # or: cargo install fast-anything
  20. ```
  21. Ports are compiled with your Rust toolchain ([rustup](https://rustup.rs)).
  22. ## Use
  23. ```sh
  24. fast-anything go --agent claude -- python app.py # or: -- node app.ts / ruby app.rb / java App.java / mvn exec:java / gradle run / go run . / php app.php / clang -O2 main.c
  25. ```
  26. Or step by step:
  27. | command | what it does |
  28. |---|---|
  29. | `scan -- <cmd>` | profiles the app, ranks functions by time × how portable they are |
  30. | `port [id]` | records up to 500 real calls, creates a one-function Rust crate + `TASK.md` |
  31. | `verify` | release-builds the port and replays every recorded call |
  32. | `enable` / `disable` | swaps the Rust in or out (one marked block, removed byte for byte) |
  33. | `bench` | times the whole app, original vs Rust, interleaved runs |
  34. | `report` | markdown + SVG card for your PR |
  35. | `doctor` | checks Rust, your runtimes and your agents |
  36. `--agent` takes `claude`, `codex`, or any command that reads a prompt on stdin. Without it, hand `TASK.md` to whatever you use.
  37. ## Proof, not vibes
  38. <p align="center"><img src="https://raw.githubusercontent.com/EL4CTEO/fast-anything/main/docs/assets/verify.gif" alt="verify catches a wrong port" width="820"></p>
  39. 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.
  40. ## Results
  41. Real runs on an i5-10500, Windows 11 (C and C++: a 4-core GitHub Actions Linux runner). Reproduce them from [`examples/`](examples).
  42. | app | before | after |
  43. |---|---|---|
  44. | Python fuzzy dedupe (700 names) | 4.91s | **42ms, 116×** |
  45. | TypeScript fuzzy dedupe (2,000 names) | 3.11s | **155ms, 20×** |
  46. | PHP fuzzy dedupe (600 names) | 2.94s | **53ms, 55×** |
  47. | Go fuzzy dedupe (3,000 names) | 3.02s | **144ms, 21×** |
  48. | Ruby fuzzy dedupe (400 names) | 3.13s | **228ms, 14×** |
  49. | Java fuzzy dedupe (4,000 names) | 3.50s | **1.18s, 3×** (11× on the function; the rest is JVM startup) |
  50. | C mandelbrot (8 zoom levels) | 431ms | **127ms, 3.4×** |
  51. | C++ fuzzy dedupe (6,000 names) | 3.02s | **1.09s, 2.7×** |
  52. 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×.
  53. ## Why not rewrite it all?
  54. - **Compile time**: each port is a one-function crate. Seconds, not minutes.
  55. - **Cache**: every port shares one `.fast/target`. Delete it whenever you like.
  56. - **Risk**: your code stays as it is. Rust is opt-in per function, checked against real behavior.
  57. ## Agents
  58. - **Claude Code plugin**: `/plugin marketplace add EL4CTEO/fast-anything`, then `/plugin install fast-anything@fast-anything` and `/fast-anything:fast python app.py`
  59. - **MCP server** (Claude Code, Codex, Cursor…), built into the binary: `claude mcp add fast-anything -- fast-anything mcp`. 8 tools: `fast_scan`, `fast_port`, `fast_verify`, `fast_enable`, `fast_disable`, `fast_bench`, `fast_report`, `fast_status`.
  60. - **Skill**: [`skills/fast-anything`](skills/fast-anything/SKILL.md) teaches any agent the loop.
  61. ## Languages
  62. | language | binding | status |
  63. |---|---|---|
  64. | Python 3.10+ | PyO3 | ✅ |
  65. | JavaScript / TypeScript (Node 22+) | napi-rs | ✅ |
  66. | Ruby 3.3+ | C ABI + JSON, through Ruby's built-in Fiddle | ✅ |
  67. | Java 22+ (`java App.java`, Maven, Gradle) | the same C bridge, through the FFM API | ✅ |
  68. | Go 1.22+ (`go run .`) | the same C bridge, through the Windows loader or dlopen (cgo) | ✅ |
  69. | PHP 8.1+ (`php app.php`) | the same C bridge, through PHP's FFI extension (`extension=ffi`) | ✅ |
  70. | C and C++ (gcc or clang: `clang -O2 main.c lib.c`) | the same C bridge, through LoadLibrary or dlopen | ✅ |
  71. 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`). In Java and PHP that means 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.
  72. Ruby, Java, Go, PHP, 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.
  73. ## License
  74. MIT

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.