Skip to content

docs(decisions): D137 — cross-platform stripping + per-OS size ceilings#73

Merged
chaploud merged 1 commit intomainfrom
develop/d137-binary-size-policy
Apr 29, 2026
Merged

docs(decisions): D137 — cross-platform stripping + per-OS size ceilings#73
chaploud merged 1 commit intomainfrom
develop/d137-binary-size-policy

Conversation

@chaploud
Copy link
Copy Markdown
Contributor

Summary

Records the two architectural decisions that landed in PR #70 (Plan C-e + C-f) so a future reader / bump knows why the current shape exists rather than reverse-engineering it from the diff.

  • Strip via LLD at link time, not via a host tool. -Dstrip=true (build.zig) sets `Module.strip = true` on the CLI module; LLD strips on every Zig target — ELF, Mach-O, PE/COFF. The host `strip` path is unfixable on Windows and `zig objcopy --strip-all` is ELF-only.
  • Per-OS size ceilings (Mac 1.30 / Linux 1.60 / Windows 1.80 MB) with ~80–100 KB headroom each. Cross-OS binary-size comparison is meaningless because PE/COFF carries higher reloc/import overhead than ELF and Mach-O is the most compact of the three.
  • `size-matrix` becomes a 3-OS matrix on the same logic.

Also captures the alternatives we rejected (zig objcopy ELF-only; single global ceiling defeating the guard; default-true strip) and the future-bump policy (tightening encouraged on sustained reductions; loosening requires a CHANGELOG entry naming the regression source).

Test plan

Records the architectural decisions behind PR #70:

- Strip via LLD (`Module.strip = true` exposed as `-Dstrip=true`)
  instead of host `strip` tool. Portable across ELF / Mach-O / PE.
- Per-OS ceilings (Mac 1.30 / Linux 1.60 / Windows 1.80 MB) with
  ~80-100 KB headroom each — regression guard, not parity target.
- `size-matrix` becomes a 3-OS matrix because the same -Dstrip=true
  path solves the per-variant size measurement on every runner.

Captures the alternatives we rejected (zig objcopy ELF-only;
single global ceiling defeating the guard; default-true strip) so a
future reader / bump knows why the current shape exists.
@chaploud chaploud merged commit 0d3b8f6 into main Apr 29, 2026
8 checks passed
@chaploud chaploud deleted the develop/d137-binary-size-policy branch April 29, 2026 02:55
chaploud added a commit that referenced this pull request Apr 29, 2026
chaploud added a commit that referenced this pull request Apr 29, 2026
…fresh (#77)

- CHANGELOG.md [Unreleased]: tag the Plan C-a/b/c/d/e/f and W52
  entries with their PR numbers (#68/#69/#71/#70/#72/#74) so the
  next /release roll-up has authoritative provenance; add D137 to
  the Internal section (cross-platform stripping + per-OS size
  ceilings, recorded post-#73); add one-line entries for the
  doc-alignment sweep (#75) and the obsolete-checklist drop (#76).
- .dev/memo.md ## Current Task: append #74/#75/#76 to the post-
  morning PR list (was "Six new PRs", now "Nine"); replace the
  "in flight: #74" paragraph with #74 in the merged list; bump
  bench-record range to #68..#76. The "Plan B sub-3 / W50 still
  pending" pointer through resume-guide.md remains intact.

No behaviour change. Doc-only.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant