Skip to content

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.

12.6 KB
Raw Blame

Changelog

0.9.1

  • PHP: scan no longer aborts on a trailing comma after the last parameter or an empty parameter list split over two lines (#171), nor on source files that aren't UTF-8; files are patched as bytes and restored byte-identical (#172).
  • scan, status and the report show a helper blocked only by where it lives or its signature as "ported inside" its portable caller instead of as blocked (#142).
  • README: the Results note that ports use every core, so whole-app speedups scale with the machine's thread count, with an independent reproduction (#169).

Thanks @alekb, @leodalaqua, @brixtonpham and @dgtlchika.

0.9.0

  • scan --android <package>: 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 @JuggyBob and @brixtonpham.

0.8.11

  • import gfxinfo, json, perfetto, simpleperf: keeps evidence measured on an Android device with its device and build metadata and a SHA-256 of the raw input. The report shows it in its own "On-device (ART)" section and never as a speed-up against the host numbers; Perfetto and simpleperf files are stored, not parsed (#143).
  • doctor: a JDK found through JAVA_HOME that is older than 22 shows as too old instead of not found; adb is listed as not used (#136).
  • scan: notes when the profiler has no call counts, and when most of the run is outside the app's functions (#142).
  • report: says when no port is switched on any more (#142).

Thanks @JuggyBob.

0.8.10

  • scan and the report show a function's own time next to its total, callees included (#163, #142).
  • scan: when a Gradle project with an Android module can't be scanned, the error says Android apps run on ART and only desktop JVMs are profiled (#136).

Thanks @brixtonpham and @JuggyBob.

0.8.9

  • --json for machine-readable output (#145).
  • Java and Kotlin: NaN and infinity pass between the app and the port (#162); C and C++ too (#150).
  • bench: waits for the app when reading its output fails (#148); the report says when and where it ran, with the scan that chose the ports (#149).
  • verify: refuses to enable a port too cheap to time per call (#151) and deletes the working copy of held-out calls (#147).
  • Python: typed PyO3 defaults and string-literal unescaping (#156), shadowed stdlib names (#155), package re-exports (#154). Node: shadowed IO names and pure crypto/fs (#153), ES module syntax without "type" (#152).
  • Tests build C without FMA contraction (#160) and enable the port before bench on Windows (#157); TASK.md notes an empty f64 sum is -0.0 (#146).

Thanks @Plastic-time, @Butterski, @mohitmishra786, @brixtonpham and @JuggyBob.

0.8.8

  • bench: rounds with an A/A control (the original against itself), a faster/slower/noise verdict, and CPU time next to wall time (#138).
  • verify: floats compare relative to their size (or their array's largest value), and -0.0 isn't 0.0 (#139).
  • port: every 5th recorded call is held out from the agent, so a port can't special-case the calls it was shown (#141).
  • C: the app calls the port through a typed entry point instead of JSON: no per-call JSON overhead, and NaN/infinity results come back as they are (#140).
  • Python: ports build without LTO like the other languages, 4–9× faster rebuilds (#137).
  • Go, C#, PHP: NaN and infinity pass between the app and the port (#130, #132, #134). Python: Pool workers' profiles and recordings are no longer lost (#128).
  • bench refuses to run with no ports enabled; the report says "slower" when the app got slower; doctor exits 0 when scanning works without Rust (#142).

Thanks @Butterski, @mohitmishra786 and @JuggyBob.

0.8.7

  • Go: variadic functions (#111), functions returning (T, error) (#107), and functions next to main() (#103) can be ported.
  • Java and Kotlin: functions with varargs can be ported (#109, #113); Java and PHP record edge cases (#93, #95).
  • C/C++: the bridge's variables no longer clash with parameter names (#99); an array's length is recorded (#97).
  • Node: CommonJS exports (#80), regex literals (#88), I/O through imports (#102) and UTF-8 BOM files (#86).
  • Python: pure stdlib calls no longer block a function (#82); UTF-8 BOM files (#86).
  • Ruby: NaN and infinity cross the bridge (#91).
  • scan: mutually recursive functions leave one to port.
  • scan --duration 30 works for every language, not only C# (#115).
  • Kotlin: functions with an expression body can be ported (#123). Ruby: methods with *rest or keyword arguments can be ported (#125).
  • C/C++: derived and edge cases run in child processes, so one that crashes or hangs is skipped (#105, #121); Java records edge cases too.
  • PHP: functions in braced namespaces can be ported (#117).
  • Python: @classmethods that don't use cls can be ported (#119); Windows py -3.13 launcher selectors work with bench (#84).
  • Plugin: agents marketplace and Codex plugin.

0.8.6

  • C#: apps start through their own launcher (App.exe), as dotnet run does, so WinUI 3 / Windows App SDK apps no longer crash with 0xc000027b (#79).
  • C#: scan --duration 30 stops a GUI or server after 30 seconds and ranks what ran (#79).
  • C#: async methods, lambdas and local functions count toward the method that holds them; waiting threads no longer dilute the shares (#79).
  • C#: when the time is in libraries reached from Main or async code, scan says which; dotnet test gets a clear explanation (#79).
  • doctor tells "ready to scan" from "ready to port": scanning doesn't need Rust (#79).
  • MCP fast_scan returns why_not for each function and the scan's notes.
  • clean removes the build cache; clean --all switches every port back and resets .fast (#76).
  • Python: a repeated SIGTERM no longer cuts off a worker writing its results.

Thanks @JuggyBob and @ashp15205.

0.8.5

  • scan: a function whose helper does I/O or is nondeterministic is no longer ranked portable (#75).
  • Python: I/O and randomness reached through an import alias are detected (#77); os.environ, sys.argv and the standard streams block without a call too (#78).

Thanks @OnurrUgur.

0.8.1

  • build and enable require the Rust sources that passed verify (#67, #64).
  • go --agent restores the best attempt's Cargo files, build.rs and sources (#68, #65).
  • disable refuses a block with a missing marker instead of reporting success (#69, #66).
  • scan and status trim long function ids from the front, so the function name stays visible (#72, #71).
  • Python: with multiprocessing.Pool(...) workers are profiled and recorded on Windows (#74, #73).

Thanks @Jack-mi and @Plastic-time.

0.8.0

  • R apps: Rscript app.R, through the C bridge and base R's .C(); no packages or R headers (#58).
  • Kotlin/JVM: Gradle apps with sources in src/main/kotlin (#63).
  • Python: ports functions that take or return NumPy arrays (#49), dataclasses and NamedTuples (#47); profiles and records inside multiprocessing workers (#51).
  • Python verify tells tuples from lists; a tuple[T, ...] return stays a tuple (#60).
  • Node.js: static methods can be ported (#43).
  • An enabled port is no longer reported as stale because of its own block (#62).

Thanks @mohitmishra786 and @vaibhavppandey.

0.7.0

  • JavaScript/TypeScript apps also run on Bun and Deno (#55); doctor checks them.
  • Node.js: worker_threads are profiled and recorded too (#53).
  • Warns when the original changed since its port was recorded (#29).
  • disable --all switches every port back at once (#41).
  • Python: scan runs through uv run, poetry run and other env runners (#34).

Thanks @mohitmishra786.

0.6.2

  • npm: the launcher sets the binary's execute bit, fixing EACCES on macOS and Linux (#27, thanks @podsni).
  • Python verify only accepts the exception type the original raises; a Rust panic no longer counts (#23).
  • build won't put an enabled port live if its Rust changed since verify (#25).
  • doctor checks minimum runtime versions and PHP's FFI extension (#31).
  • go --agent sends a right-but-slower port back to the agent for speed, and keeps the best right attempt (#35).
  • verify --all re-checks every port (#38).
  • MCP: progress notifications during long tool calls (#44).

Thanks @mohitmishra786.

0.6.1

  • Python: verify tells ints from floats (#9); @staticmethods can be ported (#13).
  • Node.js: verify checks functions that aren't exported (#15); entry-script functions port when the main code sits under if (import.meta.main) or require.main === module (#17); const functions port (declared with let while enabled, put back on disable) (#19); typed-array edge cases, Uint8ClampedArray, Buffer and Set<string> (#22). Thanks @mohitmishra786 and @ashp15205.
  • bench warns when the app prints something else with the Rust ports (#11).
  • C/C++: Intel oneAPI compilers (icx, icpx, dpcpp); -fsycl builds profile host code only (#21, thanks @Asahi-Prv).

0.6.0

  • C# / .NET 8+: fast-anything scan -- dotnet run -c Release. Profiled with the runtime's own EventPipe sampler (nothing to install), sources read with Roslyn, ports called through NativeLibrary. Static methods taking numbers, strings, arrays, lists and string-keyed dictionaries; verify adds edge cases and shrunk inputs. Thanks @JuggyBob for the request (#3).
  • port refuses functions that change their arguments in place (seen while recording): a port only returns a value, so verify could pass a port that drops those changes (#4).
  • Python: parameters with non-literal defaults and keyword-only parameters get valid PyO3 signatures (#5, thanks @mohitmishra786); TASK.md shows an empty set as set() (#7).
  • Ports rebuild about 4× faster after each edit (no LTO, parallel codegen; no measurable runtime cost).

0.5.1

  • Python: keyword arguments get edge cases and smaller inputs in verify; bytes, bytearray and tuple[T, ...] map to Rust types; fixed generated byte literals. Thanks @ashp15205 (#1).

0.5.0

  • Edge cases in verify: NaN, ±infinity, -0.0, 0 and ±1, non-ASCII text (accents, CJK, emoji, combining marks), empty and up to 4,096-item inputs, built from the recorded calls and answered by the original. Python, Node.js/TypeScript, Ruby, Go and C++.
  • A port that's right but slower per call than the original (the call into Rust costs more than the work) isn't enabled; enable --force overrides.

0.4.0

  • C and C++ (gcc or clang): fast-anything scan -- clang -O2 main.c lib.c. fast-anything builds the app itself, profiles every function for one run, and loads ports with LoadLibrary or dlopen. C ports take numbers, strings and const T * + length arrays; C++ ports also take std::string, vector, array, map and pair.
  • Java apps built with Maven (mvn -q compile exec:java) or Gradle (gradle -q run): sources come from src/main/java, every JVM the build starts is profiled, and Gradle runs without its daemon.

0.3.0

  • PHP (8.1+): apps run as php app.php. Profiled with a one-line timer per function for one run, parsed with PHP's tokenizer, ports called through the FFI extension.

0.2.0

  • Java (22+): apps run as java App.java. Profiled with Flight Recorder, parsed with javac's own parser, ports called through the FFM API.
  • Go (1.22+): apps run as go run .. Profiled with pprof, bench times a prebuilt binary so the compiler isn't counted. Ports load through the Windows loader or dlopen.
  • Ports for the C-bridge languages are now verified by fast-anything itself, in a child process, so a crashing port can't take it down.
  • Temporary edits made while profiling or recording are backed up in .fast/backup and restored even after an interrupted run.

0.1.0

  • Profile, port, verify, enable, bench and report for Python (PyO3), Node.js/TypeScript (napi-rs) and Ruby (C ABI + JSON via Fiddle, no headers needed).
  • Ports functions in the entry script too, when its main code is under a main guard.
  • Ports the outermost hot loop, with the helpers it calls, so the app crosses into Rust once instead of per call.
  • Verifies against up to 500 real recorded calls plus derived cases (shrunk inputs answered by the original).
  • go --agent claude|codex|<cmd>: the whole loop in one command. doctor checks your toolchain.
  • MCP server (fast-anything mcp), Claude Code plugin and agent skill.
  • npm (npm i -g @el4cteo/fast-anything) and crates.io packages, prebuilt binaries for Windows, macOS and Linux.