ADR-0204 kickoff: binary-size campaign — measured baseline + levers (D-521/D-522)#144
Merged
Conversation
…D-521/D-522) Trigger: dogfooding mailbox from_cljw_05 (cljw measures zwasm at 44% of its shipped code, 4.0 MB budget line). zwasm-side symbol attribution (ReleaseSafe arm64 CLI 5,282,584 B @71cccba76) confirms and re-prioritizes: - api.jit_host_bridge = 1,311 KB / 5,453 syms (92% of api.*) — a comptime thunk cross-product (t2fp x2,880 + t1fp x960 + t0..4), NOT api surface. Lever #1 = D-522 (descriptor-driven trampolines; ABI/api unchanged). - engine.codegen.arm64.emit.compile = one 707 KB symbol (~161-arm ZirOp switch; handlers already extracted, dispatch_collector ADR-0074 substrate exists). Lever #2 = D-521 (finish registration, delete the switch; acceptance = emitted JIT bytes identical). - size_history.yaml baseline re-recorded: ReleaseFast base DOUBLED since 2026-06-12 (1,972,696 -> 3,884,856 B). Docs+ledger only; stage PRs follow separately.
jit_host_bridge instantiation axes = arg-kinds x RetKind(5) x MAX_HOST_SLOTS(64); the x64 slot axis is 94% of the product and exists only to comptime-hardcode the slot index. Stage 1 = shared FP-bridge delegation (~0.8 MB, no ABI change); stage 2 = slot-axis collapse via runtime slot conveyance (~0.4 MB, internal call-sequence change).
chaploud
enabled auto-merge (squash)
July 16, 2026 03:29
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Kickoff for the binary-size campaign (ADR-0204), triggered by dogfooding mailbox
from_cljw_05: cljw's binary-size campaign measured zwasm as its largest component (~2.99 MB of__text, 44% of all code) and sent three finished-form requests. This PR is docs + ledger only — stage PRs follow separately.Measured baseline (2026-07-16, ReleaseSafe arm64 CLI 5,282,584 B @71cccba76)
Symbol attribution (
nm -n, next-addr − addr) confirms cljw's numbers and re-prioritizes the levers:api.jit_host_bridgecomptime thunk cross-product (t2fp×2,880 + t1fp×960 + t0..4×320)engine.codegen.arm64.emit.compile(~161-arm ZirOp switch; handlers already inop_*.zig;dispatch_collectorADR-0074 substrate exists)baseseriesAlso corrected in the mailbox reply (
to_cljw_05.md, local): the x86_64 emitter already exists and is target-comptime-gated (0 B in the arm64 binary), contrary to from_cljw_05's "planned" framing.Changes
.dev/decisions/0204_binary_size_campaign.md— campaign ADR (D1 thunk collapse / D2 table-driven dispatch completion / D3 module split = only-if-free).dev/debt.yaml— new rows D-521, D-522 (front: binary-size).dev/handover.md— active-front sectionbench/results/size_history.yaml— baseline rows re-recorded (base + lean)Constraints carried from the request
No behaviour change, no JIT-output change, no API break; acceptance for D-521 = emitted JIT bytes identical (test-aot-diff + fuzz-diff); D-522 bench-gated against per-call regression.