Notes on relink-engine.sh in the engine's source kit
====================================================

The engine's source kit, engine-89e502e3-tellop-source.tar.gz (SHA-256
7e9d47f6489928e6e48458c14701cdeddcd1573b9a2a15c7193353886c778c16), is
published and never changes, so these corrections to its relink-engine.sh and
README.txt travel here. They come from reading the sources named below, not
from a run: Pathnomic Labs has not run relink-engine.sh. Line numbers are those
of the files in that kit (relink-engine.sh, README.txt), of WebKit in its
webkit/ folder, and of Bun in its bun/bun-v1.3.14.tar.gz.

1. Ruby 2.5 or later is needed too.
   WebKit's CMake stops without it: webkit/Source/cmake/WebKitCommon.cmake,
   lines 205-222 ("Ruby 2.5 or higher is required."). relink-engine.sh's tool
   check (line 33) and README.txt's list of what to install (lines 85-93) do
   not name it. macOS includes /usr/bin/ruby 2.6.10, so it is usually there.

2. The relinked engine's least macOS is the build Mac's SDK, not 13.0.
   A local Bun build targets the installed macOS SDK's major version; only a
   build on Bun's CI targets 13.0 (Bun's scripts/build/config.ts, lines
   840-909, detectMacosSdk). README.txt's lines 86-87 (macOS 13.0 and later)
   describe Oven's build of the libraries, not the result: an engine relinked
   on a Mac with the macOS 15 SDK may not start on macOS 13 or 14.

3. Use LLVM 21.1.8, or another 21.1.x.
   Bun accepts only LLVM 21.1.x (scripts/build/tools.ts, lines 264-270:
   at least 21.1.0 and below 21.1.99), while relink-engine.sh's check (line
   36) accepts any clang 21. Use 21.1.8, as README.txt says.

4. The Zig compiler Bun's build downloads is not pinned by the kit.
   Bun's build downloads Oven's Zig (commit
   04e7f6ac1e009525bc00934f20199c68f04e0a24) itself, while it builds
   (scripts/build/zig.ts, lines 272-293; a build off Bun's CI takes the
   plain build, lines 212-215):
       https://github.com/oven-sh/zig/releases/download/autobuild-04e7f6ac1e009525bc00934f20199c68f04e0a24/bootstrap-aarch64-macos-none.zip
   Pathnomic Labs downloaded it on 2026-10-04: 95,927,647 bytes, SHA-256
   3f4a0aac9e949b4b116e451e1e66ef88415077697eea4e00978672e4ac4a71d9. Neither
   kit carries it, and Bun's build does not check that digest; check it
   yourself, and the build depends on Oven keeping that release online.
   To build with a Zig you have checked instead, unpack that file and set
   BUN_ZIG_PATH to the folder holding its zig program and its lib/ folder
   before running relink-engine.sh: Bun's build then downloads no Zig and
   uses that one (scripts/build/zig.ts, lines 228-247, zigPath, and lines
   401-411, which stop the build when that folder has no zig or no lib/).
   A relative BUN_ZIG_PATH is read from Bun's source folder, so give the
   full path.

5. Set GIT_SHA to Bun's commit.
   With no Git checkout of Bun, Bun's build records its revision as
   "unknown", or as the commit of any Git checkout the work folder sits in
   (scripts/build/config.ts, lines 985-995, getGitRevision; BUILDKITE_COMMIT
   and GITHUB_SHA, when set, come first). Before running relink-engine.sh:
       export GIT_SHA=0d9b296af33f2b851fcbf4df3e9ec89751734ba4
   (bun-v1.3.14's commit). It changes only the revision Bun reports, not
   what is built.

Questions: support@pathnomic.com.
