Install once:
bun installbun start— stable local page server at http://localhost:3000bun run start:windows— Windows-friendly fallback without automatic port cleanupbun run check— typecheck plus lintbun test— small durable invariant suite
bun run build:package— emitdist/for the published ESM packagebun run package-smoke-test— pack the tarball and verify temporary JS + TS consumersbun run site:build— build the static demo site intosite/bun run generate:bidi-data— refresh the checked-in simplified Unicode bidi ranges
prepack also rebuilds dist/ through plain tsc, so keep runtime .js specifiers honest in source imports.
bun run accuracy-check— Chrome browser sweepbun run accuracy-check:safaribun run accuracy-check:firefoxbun run accuracy-snapshot— refreshaccuracy/chrome.jsonbun run accuracy-snapshot:safaribun run accuracy-snapshot:firefoxbun run benchmark-check— Chrome benchmark snapshotbun run benchmark-check:safaribun run pre-wrap-check— compact browser oracle for{ whiteSpace: 'pre-wrap' }bun run keep-all-check— compact browser oracle for{ wordBreak: 'keep-all' }, including mixed-script no-space canariesbun run probe-check— smaller browser probe/diagnostic entrypointbun run probe-check:safariOn a first-break mismatch, probe output now includes a small break trace.sN:gMmeans segment/grapheme position,unitis that unit's width,fitis the cumulative fitted width from the current line start, and[ours]/[browser]mark the competing break boundaries. For Safari URL/query misses or other extractor-sensitive cases, cross-check--method=spanbefore changing the engine.
bun run corpus-check— diagnose one corpus at one or a few widthsbun run corpus-check:safaribun run corpus-sweep— maintained Chromestep=10corpus width sweepbun run corpus-sweep:safari— maintained Safaristep=10corpus width sweepbun run corpus-font-matrix— same corpus under alternate fontsbun run corpus-font-matrix:safaribun run corpus-taxonomy— classify a mismatch field into steering bucketsbun run corpus-status— rebuildcorpora/dashboard.jsonbun run corpus-status:refresh— refresh Chrome and Safaristep=10sweeps, then the corpus dashboard
bun run status-dashboard— rebuildstatus/dashboard.json
The ones worth keeping in your muscle memory:
/demos/index/demos/bubbles/demos/dynamic-layout/demos/editorial-engine/demos/justification-comparison/demos/markdown-chat/demos/rich-note/accuracy/benchmark/corpus
Use these for the current checked-in picture:
- STATUS.md — short pointer doc for the main browser accuracy + benchmark snapshots
- status/dashboard.json — machine-readable main dashboard
- accuracy/chrome.json, accuracy/safari.json, accuracy/firefox.json — raw browser accuracy rows
- benchmarks/chrome.json, benchmarks/safari.json — raw benchmark snapshots
- corpora/STATUS.md — short pointer doc for long-form corpora
- corpora/dashboard.json — machine-readable corpus dashboard
- corpora/chrome-step10.json, corpora/safari-step10.json — checked-in browser
step=10corpus sweep snapshots - RESEARCH.md — the exploration log and the durable conclusions behind the current model
For one-off performance and memory work, start in a real browser.
Preferred loop:
- Start the normal page server with
bun start. - Launch an isolated Chrome with:
--remote-debugging-port=9222- a throwaway
--user-data-dir - background throttling disabled if the run is interactive
- Connect over Chrome DevTools or CDP.
- Use a tiny dedicated repro page before profiling the full benchmark page.
- Ask the questions in this order:
- Is this a benchmark regression?
- Where is the CPU time going?
- Is this allocation churn?
- Is anything still retained after GC?
Use the right tool for each question:
- Throughput / regression:
- pages/benchmark.ts
- or a tiny dedicated stress page when the issue is narrower than the whole benchmark harness
- CPU hotspots:
- Chrome CPU profiler or performance trace
- Allocation churn:
- Chrome heap sampling during the workload
- Retained memory:
- force GC, take a before heapsnapshot, run the workload, force GC again, take an after heapsnapshot, and diff what survives
A pure Bun/Node microbenchmark is still useful for cheap hypothesis checks, but it is not the final answer when the question is browser behavior.