mise-pin zig 0.15.2; rebuild libghostty-vt ReleaseFast — 27-32x pipeline speedup
Added .mise.toml pinning zig = "0.15.2" (the minimum the vendored
Ghostty commit requires) and taught the Makefile to resolve zig
through mise when available, falling back to PATH. Contributors run
`mise install` once and `make deps` just works.
Re-ran the pipeline benchmarks after rebuilding libghostty-vt with
ReleaseFast (same hardware, AMD Ryzen 7 7800X3D):
Debug ReleaseFast speedup
Pipeline 8-colour @120fps 63 fps 2030 fps 32x
Pipeline truecolor @120fps 34 fps 931 fps 27x
Emulator-only truecolor 34 fps 2051 fps 60x
7-16x headroom over 120 fps for the heaviest workload (truecolor
full-screen redraws). Static library size 33 MiB -> 13 MiB.
TODO.md baseline numbers updated to reflect post-fix throughput;
the "Debug-mode lib" finding is folded into the result it produced
rather than left as an open item.
This commit is contained in:
15
Makefile
15
Makefile
@@ -31,10 +31,19 @@ deps-fetch: $(SOURCE)/.git/HEAD
|
||||
# debug build of the upstream lib.
|
||||
GHOSTTY_VT_OPTIMIZE ?= ReleaseFast
|
||||
|
||||
# Resolve zig via the project's mise pin (.mise.toml) when available,
|
||||
# falling back to whatever's on PATH. mise keeps the zig version in
|
||||
# lockstep with what the pinned ghostty commit requires; without it,
|
||||
# contributors have to chase the version requirement themselves.
|
||||
ZIG := $(shell command -v mise >/dev/null && mise which zig 2>/dev/null || command -v zig 2>/dev/null)
|
||||
|
||||
$(INSTALL)/lib/libghostty-vt.a: $(SOURCE)/.git/HEAD
|
||||
@command -v zig >/dev/null || { echo "ERROR: zig not on PATH (need >=0.15.2 to build libghostty-vt)"; exit 1; }
|
||||
@echo ">> building libghostty-vt with zig (optimize=$(GHOSTTY_VT_OPTIMIZE))"
|
||||
@cd $(SOURCE) && zig build -Demit-lib-vt -Doptimize=$(GHOSTTY_VT_OPTIMIZE) --prefix $(INSTALL)
|
||||
@if [ -z "$(ZIG)" ]; then \
|
||||
echo "ERROR: zig not available. Run \`mise install\` (see .mise.toml — needs zig 0.15.2) or install zig manually."; \
|
||||
exit 1; \
|
||||
fi
|
||||
@echo ">> building libghostty-vt with $(ZIG) (optimize=$(GHOSTTY_VT_OPTIMIZE))"
|
||||
@cd $(SOURCE) && $(ZIG) build -Demit-lib-vt -Doptimize=$(GHOSTTY_VT_OPTIMIZE) --prefix $(INSTALL)
|
||||
@test -f $(INSTALL)/lib/libghostty-vt.a || { echo "ERROR: expected static lib at $(INSTALL)/lib/libghostty-vt.a"; exit 1; }
|
||||
@echo ">> libghostty-vt installed under $(INSTALL)"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user