30a49f6d
mise
a73x 2026-09-06 15:54
Commit message
.gitignore
| Old | New | ||
|---|---|---|---|
| @@ -11,11 +11,7 @@ dist/ | |||
| 11 | .xversion/ | 11 | .xversion/ |
| 12 | .release/ | 12 | .release/ |
| 13 | 13 | ||
| 14 | # Pinned toolchain, vendored (380MB): deps/zig/zig is what the Makefile runs. | 14 | # `deps/quic/{out,work}` are generated dependency build artifacts. |
| 15 | # No trailing slash, and `deps/quic/{out,work}` beside it: a worktree links them in | ||
| 16 | # rather than copying them, and a trailing slash matches a directory only — | ||
| 17 | # which is how the symlinks got swept into two commits. | ||
| 18 | deps/zig | ||
| 19 | deps/quic/out | 15 | deps/quic/out |
| 20 | deps/quic/work | 16 | deps/quic/work |
| 21 | 17 | ||
Makefile
| Old | New | ||
|---|---|---|---|
| @@ -1,6 +1,11 @@ | |||
| 1 | # ghostty (pinned in build.zig.zon) hard-requires Zig 0.15.x; the system | 1 | # ghostty (pinned in build.zig.zon) hard-requires Zig 0.15.x. mise owns the |
| 2 | # default zig is 0.17-dev. Override with ZIG=... if yours lives elsewhere. | 2 | # version and resolves the executable; override with ZIG=... for a deliberate |
| 3 | ZIG ?= $(CURDIR)/deps/zig/zig | 3 | # non-mise toolchain. |
| 4 | ZIG ?= $(shell mise which zig 2>/dev/null) | ||
| 5 | ifeq ($(strip $(ZIG)),) | ||
| 6 | $(error Zig 0.15.2 is managed by mise; run `mise install` or set ZIG=/path/to/zig) | ||
| 7 | endif | ||
| 8 | export ZIG | ||
| 4 | 9 | ||
| 5 | # On a Mac the pinned zig cannot link against Xcode 26.4+'s SDK (see | 10 | # On a Mac the pinned zig cannot link against Xcode 26.4+'s SDK (see |
| 6 | # deps/mac-sdk.sh). The shim dir goes FIRST on PATH for every recipe here, | 11 | # deps/mac-sdk.sh). The shim dir goes FIRST on PATH for every recipe here, |
README.md
| Old | New | ||
|---|---|---|---|
| @@ -9,9 +9,10 @@ a dropped connection is a non-event. Linux and Apple-silicon macOS, prototype | |||
| 9 | 9 | ||
| 10 | ## Build | 10 | ## Build |
| 11 | 11 | ||
| 12 | Requires Zig **0.15.x** (ghostty pin — a newer Zig will not build the | 12 | Requires mise and Zig **0.15.2** (the ghostty pin — a newer Zig will not build |
| 13 | dependency). The Makefile points at a pinned toolchain path; override with | 13 | the dependency). The repository's `mise.toml` declares the version and the |
| 14 | `make ZIG=/path/to/zig` if yours lives elsewhere. | 14 | Makefile resolves it through mise. Override with `make ZIG=/path/to/zig` only |
| 15 | when deliberately using another installation. | ||
| 15 | 16 | ||
| 16 | ```sh | 17 | ```sh |
| 17 | make build # first build fetches + compiles the QUIC deps: ~30MB, a few minutes, once | 18 | make build # first build fetches + compiles the QUIC deps: ~30MB, a few minutes, once |
deps/mac-sdk.sh
| Old | New | ||
|---|---|---|---|
| @@ -32,13 +32,15 @@ set -eu | |||
| 32 | [ "$(uname)" = Darwin ] || exit 0 | 32 | [ "$(uname)" = Darwin ] || exit 0 |
| 33 | SELF="$(cd "$(dirname "$0")" && pwd)" | 33 | SELF="$(cd "$(dirname "$0")" && pwd)" |
| 34 | OUT="$SELF/mac-sdk" | 34 | OUT="$SELF/mac-sdk" |
| 35 | ZIG_STUB="$SELF/zig/lib/libc/darwin/libSystem.tbd" | 35 | ZIG="${ZIG:?deps/mac-sdk: ZIG is not set}" |
| 36 | ZIG_ROOT="$(cd "$(dirname "$ZIG")" && pwd)" | ||
| 37 | ZIG_STUB="$ZIG_ROOT/lib/libc/darwin/libSystem.tbd" | ||
| 36 | REAL="$(/usr/bin/xcrun --sdk macosx --show-sdk-path)" | 38 | REAL="$(/usr/bin/xcrun --sdk macosx --show-sdk-path)" |
| 37 | if grep -m1 '^targets:' "$REAL/usr/lib/libSystem.B.tbd" | grep -q 'arm64-macos'; then | 39 | if grep -m1 '^targets:' "$REAL/usr/lib/libSystem.B.tbd" | grep -q 'arm64-macos'; then |
| 38 | rm -rf "$OUT" # the SDK is linkable again; leave nothing to shadow it | 40 | rm -rf "$OUT" # the SDK is linkable again; leave nothing to shadow it |
| 39 | exit 0 | 41 | exit 0 |
| 40 | fi | 42 | fi |
| 41 | [ -f "$ZIG_STUB" ] || { echo "deps/mac-sdk: no zig stub at $ZIG_STUB (is deps/zig in place?)" >&2; exit 1; } | 43 | [ -f "$ZIG_STUB" ] || { echo "deps/mac-sdk: no Zig 0.15.2 stub at $ZIG_STUB" >&2; exit 1; } |
| 42 | # Marker: the shim exists AND points at this SDK. A new Xcode moves REAL. | 44 | # Marker: the shim exists AND points at this SDK. A new Xcode moves REAL. |
| 43 | if [ -x "$OUT/bin/xcrun" ] && [ "$(readlink "$OUT/sdk/usr/include")" = "$REAL/usr/include" ]; then | 45 | if [ -x "$OUT/bin/xcrun" ] && [ "$(readlink "$OUT/sdk/usr/include")" = "$REAL/usr/include" ]; then |
| 44 | exit 0 | 46 | exit 0 |
deps/quic/build-deps.sh
| Old | New | ||
|---|---|---|---|
| @@ -29,11 +29,9 @@ case "$T" in | |||
| 29 | esac | 29 | esac |
| 30 | 30 | ||
| 31 | SELF="$(cd "$(dirname "$0")" && pwd)" | 31 | SELF="$(cd "$(dirname "$0")" && pwd)" |
| 32 | # The repo's pinned toolchain first: every box that builds mux has it at | 32 | # The Makefile exports the mise-resolved 0.15.2 executable. Keep the |
| 33 | # deps/zig, and a Mac has no other 0.15.2 (brew ships 0.16). The Downloads | 33 | # environment override so this script remains usable on its own. |
| 34 | # path is the original dev box's spelling, kept so an old rig still runs. | 34 | ZIG="${ZIG:-$(mise which zig 2>/dev/null || true)}" |
| 35 | ZIG="${ZIG:-$SELF/../zig/zig}" | ||
| 36 | [ -x "$ZIG" ] || ZIG="$HOME/Downloads/zig-x86_64-linux-0.15.2/zig" | ||
| 37 | OUT="$SELF/out/$T" | 35 | OUT="$SELF/out/$T" |
| 38 | W="$SELF/work" | 36 | W="$SELF/work" |
| 39 | 37 | ||
mise.toml
| Old | New | ||
|---|---|---|---|
| @@ -0,0 +1,2 @@ | |||
| 1 | [tools] | ||
| 2 | zig = "0.15.2" | ||