S02-05 - Swift, Contracts and .NET
Purpose: Where the Swift toolchain comes from, the Swift tasks, the contract tools, and the .NET toolchain to come.
Design
Section titled “Design”Swift comes from Xcode, not mise
Section titled “Swift comes from Xcode, not mise”The compiler, swift-format, and xcodebuild ship inside Xcode. So
the Xcode version is the pin.
Package.swiftdeclaresswift-tools-version: 6.4, the floor, which ships with Xcode 27. Contributors may use a newer Xcode.- The package’s deployment target is macOS 26, one major version below
the oldest v1 host (NFR04-host-platformsNFR04-host-platforms: Host platformsFirst target: Apple Silicon, macOS 27 or later, because wb image build needs the guest provisioning options that are new in macOS 27 (X17-image-build).). A contributor whose Mac
can’t run macOS 27 yet can still build the package and run its tests.
The compiler then makes each call to an API new in macOS 27 check
#available. The programs refuse an older host at run time:wb-vmdwithvmd-host-unsupported(S04-04-vm-processesS04-04-vm-processes: Per-VM ProcessesOne wb-vmd for each VM, the wb-vmd-layer entry of the Claude Code layer build, the wb-vmd-recipe entry of a named image's recipe, and wb-diskfmt, which formats a VM's new data disk., “Slot checks”), andwb-dev-bundle provisionwithhost-unsupported. The app bundle is built for macOS 27, so macOS doesn’t open it on an older Mac. - CI uses the default Xcode of its pinned macOS runner image. Both
macOS jobs, Swift and Go’s macOS leg, run on the
xcode-27image, which is macOS 27 with Xcode 27, the oldest v1 host (NFR04-host-platformsNFR04-host-platforms: Host platformsFirst target: Apple Silicon, macOS 27 or later, because wb image build needs the guest provisioning options that are new in macOS 27 (X17-image-build).). The Go module has no cgo and builds against no macOS SDK, but its darwin-only tests (localipcpeer credentials,vmdspawn, thewb-diskfmtchild) depend on how macOS behaves, so they run on a macOS that v1 supports. - SwiftLint, which Xcode does not ship, is pinned in
.mise.toml.
Swift tasks
Section titled “Swift tasks”Swift tasks iterate packages/*-swift in-shell. So the tasks pick up a
new package without changes.
Contracts
Section titled “Contracts”buf is pinned in .mise.toml like every other tool. The plugins it
runs are pinned where their language pins dependencies: tool lines in
go.mod, and the Swift package’s Package.resolved
(S10-tech-stackS10-tech-stack: Technology ChoicesFix languages, libraries, packaging, and repository layout, with the reason for each choice., “Generated contract code”).
proto:checkruns in the Go job on Linux. Itsbuf breakingstep compares withorigin/main, so that job checks out the full history.proto:check-swiftruns in the Swift job.
A .NET toolchain is added with the first .NET component
(S12-platformsS12-platforms: PlatformsWhich host and guest operating systems Wraith Box targets, how platform-specific code is isolated, what each platform uses, and how wb works inside WSL.). It is pinned in .mise.toml like every other tool,
and has its own CI job on a Windows runner.
Status: Active