d71ca589
fix: install ReleaseSafe, so `yes` is not 600x slower than tmux
a73x 2026-08-21 12:30
Commit message
Makefile
| Old | New | ||
|---|---|---|---|
| @@ -20,9 +20,22 @@ build: | |||
| 20 | # (ptyclient, wsclient, rawmode, ...) is a test fixture that would shadow | 20 | # (ptyclient, wsclient, rawmode, ...) is a test fixture that would shadow |
| 21 | # nothing useful on PATH. | 21 | # nothing useful on PATH. |
| 22 | BINDIR ?= $(HOME)/.local/bin | 22 | BINDIR ?= $(HOME)/.local/bin |
| 23 | install: build | 23 | # ReleaseSafe, like `release` — not the Debug tree `build` leaves in |
| 24 | # zig-out. ghostty gates its page-integrity check on ITS optimize mode, and | ||
| 25 | # in Debug that check rebuilds a hash map over every cell (and stands up a | ||
| 26 | # fresh DebugAllocator) on every page mutation: 20k lines of `yes` took | ||
| 27 | # 3713ms against 6ms ReleaseSafe, tmux 6ms. Nobody wants that on PATH. | ||
| 28 | # | ||
| 29 | # Staged in its own prefix because a `-Doptimize=` build would otherwise | ||
| 30 | # overwrite zig-out/bin, leaving the dev tree's binaries and test fixtures | ||
| 31 | # silently not the ones `make test` just built — the same trap xversion-build | ||
| 32 | # documents below. | ||
| 33 | INSTDIR ?= dist/install | ||
| 34 | install: | ||
| 35 | $(ZIG) build -Doptimize=ReleaseSafe -p $(INSTDIR) | ||
| 24 | install -d $(BINDIR) | 36 | install -d $(BINDIR) |
| 25 | install -m755 zig-out/bin/muxd zig-out/bin/mux zig-out/bin/muxa zig-out/bin/muxweb $(BINDIR)/ | 37 | install -m755 $(INSTDIR)/bin/muxd $(INSTDIR)/bin/mux \ |
| 38 | $(INSTDIR)/bin/muxa $(INSTDIR)/bin/muxweb $(BINDIR)/ | ||
| 26 | 39 | ||
| 27 | # The artifact a release publishes, built the way every release since | 40 | # The artifact a release publishes, built the way every release since |
| 28 | # v0.0.1-4 has been: static musl so one binary runs on any x86_64 Linux, | 41 | # v0.0.1-4 has been: static musl so one binary runs on any x86_64 Linux, |