S12-02 - Languages and CI
Purpose: The language used on each platform, and how CI builds each platform.
Design
Section titled “Design”Languages per platform (NFR07-maintainability)
Section titled “Languages per platform (NFR07-maintainability)”- Go everywhere for the core, the guest agent, and as much platform
code as possible:
- HCS, Hyper-V sockets, and named pipes on Windows;
- KVM-based VMMs, D-Bus, Landlock, and seccomp on Linux.
- macOS: Swift, built with Xcode, for the Virtualization framework
(
wb-vmd) and notifications (native helper). Go reaches the Keychain and Secure Enclave through a thin cgo shim. The shim is linked into each process that S15-least-privilegeS15-least-privilege: Least Privilege on the HostThe security design for SEC12-least-privilege: which rights Wraith Box takes on the host, where credentials are held, and how each host process gets only the credentials it needs, for only as long as it needs them. declares store access for. - Windows: C# on .NET, built with the
dotnetCLI, for a native notification and tray helper when that is built. Nothing else on Windows is expected to need it. - Linux: no native language expected. If one is ever needed, it gets a spec change first.
Go is built, linted, vetted, and tested natively on macOS, Ubuntu, and
Windows runners from the start. A pull request into main skips the
Windows leg, and a push to main and a pull request into a campaign’s
train run it (S02-02-ciS02-02-ci: CIHow the CI workflow runs the checks, which jobs a pull request or push skips, and the Go and Swift caches.). Swift runs on macOS
only. Both macOS jobs, Swift and Go’s macOS leg, run on the xcode-27
runner image, 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 darwin-only Go tests and wb-vmd’s host
check then run on a macOS that v1 supports. The Swift package itself targets
macOS 26, so its tests also run on an older Mac (S02-05-swift-contracts-dotnetS02-05-swift-contracts-dotnet: Swift, Contracts and .NETWhere the Swift toolchain comes from, the Swift tasks, the contract tools, and the .NET toolchain to come.). A .NET job is added with the first .NET component.
Decisions
Section titled “Decisions”The Keychain shim in each process that uses the store
Section titled “The Keychain shim in each process that uses the store”Each process with declared store access links the cgo shim itself.
- Why: no process then gets a credential through another (SEC04-no-guest-secretsSEC04-no-guest-secrets: No secrets in the guestThis includes the model credential., SEC12-least-privilegeSEC12-least-privilege: Least privilege on the hostNo root or administrator rights at run time and no extra host user accounts.).
Status: Draft