Split from #12493 (box 1). Measured on the crew box (72 cores, load ~110), an empty migrated data directory, spawn to first /readyz 200:
bun src/main.ts: 3.8–4.4 s
bun main.js (bun build --minify --target bun src/main.ts, #16853): 1.3–1.55 s
The gap is module loading, not forge code: main.ts reaches 3,985 modules (22 MB of source) statically, and a --cpu-prof of the boot has 94 samples in 4.5 s because the loader runs outside JS. The real rolls already boot the bundle (#17009); production does not.
Blocker for production use: workers started by file (new Worker(new URL("./x.ts", import.meta.url)) in looks/thumb.ts, checks/scan.ts, runs/log.ts, flow/pages.ts, engine/host.ts, system/largest_dirs.ts) are not emitted by bun build src/main.ts, so the bundle must name them as extra entry points.
Split from #12493 (box 1). Measured on the crew box (72 cores, load ~110), an empty migrated data directory, spawn to first
/readyz200:bun src/main.ts: 3.8–4.4 sbun main.js(bun build --minify --target bun src/main.ts, #16853): 1.3–1.55 sThe gap is module loading, not forge code:
main.tsreaches 3,985 modules (22 MB of source) statically, and a--cpu-profof the boot has 94 samples in 4.5 s because the loader runs outside JS. The real rolls already boot the bundle (#17009); production does not.Blocker for production use: workers started by file (
new Worker(new URL("./x.ts", import.meta.url))inlooks/thumb.ts,checks/scan.ts,runs/log.ts,flow/pages.ts,engine/host.ts,system/largest_dirs.ts) are not emitted bybun build src/main.ts, so the bundle must name them as extra entry points.Done:
Files: test/helpers/bundle-boot.ts, forge.json, src/release/swap.ts