Highlights:
- Prettier, ported to Rust. Prettier 3.6.2 behind a Rust front door: 15,837 of 17,224
recorded runs format fully in Rust across JavaScript, TypeScript, JSX, JSON, GraphQL, YAML,
Markdown, CSS, SCSS and Less, and all 17,224 match Prettier byte for byte. 19x faster on JS/TS
from the command line (Apple M4). Seedocs/real-world.md#prettier. - json-server, ported to a pure Rust binary: 514/514 HTTP cases, 3.5 MB of memory at idle
instead of 74 MB. - Side effects are compared: outgoing HTTP calls, email and the database's state, per case.
map: the whole port at a glance, and every piece whose original changed upstream.- Plain JavaScript gets types from JSDoc and
.d.ts; OpenCode joins the agentssetup
registers.
Changed: diff exits non-zero when the recording is stale (it printed a warning and exited 0).
-
app record --effects http,smtp,--effect-env VAR=KIND,--db-resetand--db-dump: record
what leaves the process per case (outgoing HTTP calls, email, the database's state) and compare
it on replay, for CLIs and servers. A rewrite that sends an email twice or writes different rows
now fails the case even when its output matches. -
map(CLI and MCP tool): every unit of the original with the crate that ports it, functions
in Rust and kept in the original, cases and lastdiff, the whole app's glue, units not ported
yet, and every port whose original changed since it was recorded.--writesaves
rust/PORT_MAP.md;--checkexits 1 while a recording is stale. -
Docs: what a real port takes, keeping the original's shape, keeping up with the original, and
checking a rewrite in any language withapp recordandapp replay --build. -
benchandrecordpass--experimental-transform-typesonly when Node accepts it: Node 26
removed the option and refused to start (#99). -
profilekeeps a Python workload script given as a relative path (python3 bench.py); its
functions were dropped and the table came out empty (#101). -
diffexits non-zero when the recording is stale, asgatealready refuses it, and the
warning says "Stale recording" (#102). -
analyzesays what a wasm-bindgen bridge needs installed, and that--kind napiruns with
what Node already has (#102). -
bridgereads types for plain JavaScript: from a sibling.d.ts/.d.mts/.d.cts, then
JSDoc@param {T} name(with[name], defaults andopts.fieldshapes) and@returns {T}.
Before, only parameters with a literal default were typed and the rest becameunknown, so
recordgenerated mostly wrong-typed inputs (#100). -
TypeScript analysis and recording resolve path aliases against the inherited
baseUrl,
including when the two options come from separate tsconfig files. -
setupalso registers OpenCode: the MCP server in~/.config/opencode/opencode.json
(mcp.servers, the whole argv incommand) and the workflow skill in
~/.config/opencode/skills/, anddoctorreads that entry back. -
A port of Prettier 3.6.2 behind a Rust front door in
demo/real-world/prettier-rsanddocs/real-world.md: 17,224/17,224 recorded CLI cases match,
15,837 of them (91.9%) formatted fully in Rust and byte-identical to Prettier, the rest handed to
Prettier per file (8.1% fallback). JavaScript, TypeScript (849 of 929 cases), JSX, JSON in
all four flavours (995 of the 1,019 JSON cases Prettier formats), GraphQL (all 787 cases
Prettier formats, with graphql-js's parser ported) YAML (3,309 of 3,310, with yaml's CST
parser and yaml-unist-parser ported), Markdown (6,305 of 6,350, with remark-parse ported and
code blocks formatted by the other ports) and CSS, SCSS and Less (all 2,004 cases Prettier
formats, with postcss, postcss-scss, postcss-less and the value, selector and media query
parsers ported) run in Rust, as do all 59 real repository
files. Ported: the doc printer (gate2,848/2,848), the printer on oxc's ESTree with
comments, classes, decorators, template literals, ternaries andprettier-ignore(gate
15,753/15,753 onformat()), and the CLI's config resolution (.prettierrcJSON,
package.json, overrides,.editorconfig, ignore files). On an M4 against Node 24: 19x faster
per file from the command line, 7x on the median JavaScript/TypeScript file in process (18x on
the median GraphQL file, 13x on the median YAML file, 25x on the median Markdown file, 9.5x on
the median CSS/SCSS/Less file); per file from the command line 8.5x for style files and 15.6x
for Markdown. No file was slower in a first run; one per language was in a second run (a one-off
stall, 135 µs against 8.5 µs in the first). -
Glue can decline one case after reading stdin:
original::run_with_stdin(args, input)hands the
case and its bytes to the original;liftrefuses while any glue still callsoriginal::. -
bridgereadsexport { a, b as c }lists. -
Fix: with
CARGO_TARGET_DIRset, every front door built into the same directory and replays
ran another app's binary; the front door builds into its ownrust/app/target. -
Fix: case and input lines nested deeper than 128 levels failed to parse; the harness and
generatedfrom_jsonread them without a depth limit. -
Fix:
--inputscase names were cut to 24 characters and collided; given names keep 96. -
A port of json-server to a pure Rust binary in
demo/real-world/json-server-rsanddocs/real-world.md: 514/514 recorded HTTP cases match
with no fallback, and six units passgate. Against Node 24 on an M4: first response in 8 to
10 ms instead of about 80, 3.5 MB of memory idle instead of 74, 2 to 4x the requests per second
on one connection and 5 to 13x on 50; 1.1 to 1.2x on writes and on the whole list of a 10,000-post
database. -
app record --http --fresh <path>copies a file or folder the server writes (its database)
into a fresh working directory for every start, from a snapshot kept with the cases;
--arg <arg>passes the original's arguments to every build too;--pace <ms>waits after each
response for work a server does after answering. json-server needed all three: it rewrites its
database on every write, and its file watcher can undo a write that follows quickly. -
bridge --as-json Tbridges a generic the app only fills with data (paginate<T>(items: T[]))
as JSON values instead of keeping it in TS. -
Fix: the HTTP front door's routes with parameters answered axum's own 400 when an escape was not
UTF-8 (/posts/%E0); parameters are now read from the URI and the unit gets the request. -
Fix:
app liftleft out the crates the wired units depend on by path (shared code, other
units), so the staged build failed; they are staged, stripped of their bindings and synced back
with the units. -
Fix: a lifted unit that keeps generated modules (
js.rs) got alib.rsthat failed
cargo fmt --check: modules are now listed in the order rustfmt keeps. -
A port of Fuse.js string-list search in
demo/real-world/fuse-rsanddocs/real-world.md: 3,414/3,414 recorded cases match, results
byte-identical to Fuse, 32x faster on 50,000 strings (5.3x on one core). -
gate's size check counts the files a TS unit imports from the repository, not only the unit. -
Batch crates with string items but other results no longer get an unused helper (clippy failed).
-
TypeScript analysis and recording keep inherited path aliases when a later tsconfig base
omitscompilerOptions.paths. -
Faster single calls on napi: every sync function crosses the binary wire with no napi
arguments (each argument cost about 55 ns), behind one JS wrapper instead of two;
serde_json::Valueparameters cross as tagged values of any shape, and errors come back in the
wire buffer. vercel/ms per call: 0.39x to 0.56x of JS over its recorded cases, andparseon a
normal string at JS speed (79 ns). -
record --from-tests -- <test command>runs the original's own test suite and records every call
it makes to the unit's functions: TS/JS with any runner (Jest, Vitest,node --test), Python
with pytest or unittest. On vercel/ms it captured 340 calls from 167 Jest tests, more than
twice the 149 inputs copied by hand. -
recordsaves a fingerprint of the original unit (recorded-from.json);diffwarns andgate
fails when the original changed since. -
known-diffs.jsonllists cases where the port is meant to differ, each with the result it gives
and a reason.diffandgatecount them as passing only with exactly that result, andgate
fails on an entry that no longer differs. -
app replay's report no longer carries temporary paths, so CI can commit it and fail on
git diff --exit-code. -
A port of vercel/ms, end to end, in
demo/real-world/vercel-ms-rs
anddocs/real-world.md: 975/975 recorded cases match; slower per call, 19x faster as a batch
forparse(3.6x with the handover), 1.3x forformat(x, { long: true }). -
Fix: a napi batch method with a structured parameter did not compile; crates with batch classes
now enable napi'sserde-jsonfeature. -
napi batches pass strings joined: items cross as one string plus UTF-16 end offsets and string
results come back the same way, about 2x faster each way. The JS API is unchanged. -
napi batches of numbers take their items as one
Float64Array:new Batch(numbers)costs
0.1 ms instead of 3.3 ms for 100,000 values. -
The generated
js.rsgainsnumber_to_string(JSString(n), digits from serde_json's fast
printer) andmath_round(JSMath.round), tested against Node. -
analyzeflagsMath.round,toFixed, and/iregexes withoutuwhere Rust's case folding
matches more (ſ, the Kelvin sign).