Building Zyquo Local Without the Xcode IDE
Zyquo Local is built entirely from the command line with SwiftPM. The Xcode IDE is never used and no .xcodeproj exists. Two toolchain pieces are required beyond a plain macOS install:
- Command Line Tools (
xcode-select --install) — provides Swift 6.4 and the macOS SDKs. - Apple Metal Toolchain — MLX compiles its GPU kernels (
.metalfiles) at build time, and themetalcompiler is not included in the Command Line Tools.
The Metal toolchain finding (Phase 0, resolved empirically 2026-07-30)
-
swift buildon a CLT-only machine fails insideCmlxwitherror: unable to spawn process 'metal' (No such file or directory)— mlx-swift 0.31.6 declares its Metal sources as SPM resources and SwiftPM'sCompileMetalFilerule shells out tometal. -
SwiftPM resolves
metalviaPATH(verified with a logging stub), so a full Xcode install is NOT required. A standaloneMetal.xctoolchainonPATHis sufficient. -
This machine uses the Metal Toolchain component copied from cluster node M4M36 (
com.apple.MobileAsset.MetalToolchain-v17.5.188.0, Apple metal version 32023.883) into:text~/Developer/Metal.xctoolchainOn a machine with Xcode 26+, the same component is installed by
xcodebuild -downloadComponent MetalToolchain.
SDK pin for SwiftUI on macOS 27 CLT
The macOS 27 SDKs shipped with the CLT expose SwiftUI's @State / @Bindable
(and related Observation wrappers) as Xcode-only macro plugins, which a plain
swift build cannot expand. As with Zyquo Term (see its ADR-0001), builds pin:
export SDKROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX26.5.sdkThe Makefile and all scripts set both SDKROOT and the Metal PATH
automatically.
Canonical build recipe
# everything below is wrapped by `make build` / `make dev` / `make release`
export SDKROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX26.5.sdk
export PATH="$HOME/Developer/Metal.xctoolchain/usr/bin:$PATH"
swift build -c release # release binary
make dev # debug app bundle, ad-hoc signed, and launch
make release # signed + notarized + stapled Zyquo Local.appVerified: a scratch package depending on mlx-swift 0.31.6 builds in seconds
with this recipe and executes on the GPU (Device(gpu, 0)), confirming the
runtime mlx.metallib resource is produced and loaded correctly.