-
gorunsbenchafter gate and switches a unit on only when it is not slower as its callers
call it; otherwise it stops atslowerwith the measured factor and where the speed is (the
batch class to call from the loop, or the caller to port with it). A wasm port called once per
item from a JS loop was 7.6x slower than the JIT, andgohad switched it on.goalso runs
refreshbefore building a crate with batches, so a<Name>Indexthe agent writes is used.
Both found by runninggo --agent claudeon a TS fixture (tests/fixtures/go-search-ts). -
wasm builds write
pkg/package.jsonwith"type": "commonjs": inside a"type": "module"
project Node loaded wasm-bindgen's CommonJS output as an ES module anddifffailed. -
profilebatches over the innermost loop: with nested loops it named the outer loop's
variable (--batch score:query) instead of the one that runs over the items. -
README: "Only the slow part" in all 20 translations. Website: "Only the slow part" and
"Switch on and off" pages (English). -
go: the hot-path loop in one command.rust-anything go --agent claude -- python3 app.py
profiles the workload, picks the outermost exported function of a portable unit that takes
arguments (bridged with--batchwhereprofileadvises it;--functionpicks another),
bridges it alone intorust/<function>-rs, records generated cases plus the calls the workload
makes, writesTASK.md, and hands the port to the agent (claude,codex, or any command
reading the prompt on stdin, with up to--roundsturns that get the failing cases back). It
then builds, diffs and gates, and switches the unit on withenableonly when every case
matches and gate passes. Without--agentit stops at the task; run it again after porting and
it keeps every finished step. Also an MCP tool. -
enableanddisable: switch a TS/JS or Python unit on in place, for every caller, with one
marked block in its original files that rebinds the ported functions to the Rust module (no
import changes, no absolute paths);disableremoves exactly those lines. The unit's
RUST_ANYTHING_UNIT_<NAME>=originalorRUST_ANYTHING_MODE=oldkeeps the original for a run,
andrecord,diff,benchandfuzzset it for the original's side.enablerefuses
while recorded cases differ (--force). Every switch is listed in one place,
Switch a port on and off. MCP tools too. -
report:report/REPORT.mdandreport/card.svgfor a pull request or README, in the v3
card's light style: the unit, recorded cases matched (diff), speedup with the call included
(bench), fallback rate, on or off, and the machine with its core count. MCP tool too. -
One build cache: ports and bridges build into one cargo target folder (
CARGO_TARGET_DIR, else
rust-anything/targetin the user's cache folder), so dependencies compile once. A package
name belongs to one crate folder there, so a second crate with the same name builds in its own
target/and cannot replace the first one's library; libraries are copied to each crate's
target/release.cleanremoves the folder (--dry-run,--forcefor aCARGO_TARGET_DIR).
Front doors keep their owntarget/. -
profilereportsportable,paramsand thebatchspec per hot function, and its workload's
stdout goes to stderr, so the MCPprofiletool no longer writes the workload's output into
the protocol stream. -
Python:
__all__was ignored when an earlier top-level statement held no assignment (a
docstring or an import, as in most modules), soanalyze,bridge, library ports and
profiletook every name without a leading underscore: names left out of__all__were
bridged and underscore names listed in it were dropped.__all__is now read after such
statements, with or without a type, follows__all__ += [...]and a later__all__ = [...],
and reads prefixed strings (r'name'). An__all__built or changed any other way
(+ other.__all__,sorted(...),__all__.extend(...), inside anifortryblock) falls
back to the names without a leading underscore rather than a partial list. Functions and
classes a module's__all__leaves out are no longer bridged. -
When
buildof a Ruby bridge fails with rb-sys'sStable API is needed but could not find a candidateand the Ruby rb-sys used (RUBY, elseruby) is older thandoctor's 3.0, the
error now ends with that Ruby's version anddoctor's install command (macOS's system Ruby is
2.6), instead of only rb-sys's hint to enablestable-api-compiled-fallback.