S12 - Platforms
Purpose: Which host and guest operating systems Wraith Box targets,
how platform-specific code is isolated, what each platform uses, and how
wb works inside WSL.
Requirements: FR16-wslFR16-wsl: WSL on WindowsOn a Windows host, wb run inside a WSL 2 distribution works on repositories in that distribution, using the VMs and services of the Windows host., FR17-same-everywhereFR17-same-everywhere: Same on every hostThe same wb commands, flags, policy files, and behavior on every host OS., SEC01-separate-kernelSEC01-separate-kernel: Separate kernelThe agent runs in a hardware-virtualized guest with its own kernel, never sharing a kernel with the host or with another environment of the user (for example a WSL distribution)., SEC02-no-host-fs-shareSEC02-no-host-fs-share: No host filesystem sharingNo host directory is mounted into the guest, read-only or otherwise., SEC04-no-guest-secretsSEC04-no-guest-secrets: No secrets in the guestThis includes the model credential., SEC05-default-denySEC05-default-deny: Default-deny egress, enforced on the hostOnly allowlisted hostnames are reachable., SEC12-least-privilegeSEC12-least-privilege: Least privilege on the hostNo root or administrator rights at run time and no extra host user accounts., 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)., NFR05-two-macos-vmsNFR05-two-macos-vms: Platform limitmacOS permits at most two concurrently running macOS guests per host., NFR07-maintainabilityNFR07-maintainability: MaintainabilityMost code is cross-platform Go., V1-01-macos-firstV1-01-macos-first: macOS firstThe first delivery target is macOS guests on macOS hosts., V1-03-win-linux-laterV1-03-win-linux-later: Windows and Linux hosts laterWindows and Linux hosts are designed for but not delivered in V1..
Design
Section titled “Design”Platform matrix
Section titled “Platform matrix”| Host ↓ / Guest → | macOS | Linux (Ubuntu LTS first) | Windows 11 |
|---|---|---|---|
| macOS 27+, Apple Silicon | v1 | later | later, blocked on spike X13-windows-guestsX13-windows-guests: Windows guests on a macOS hostCan the Virtualization framework boot Windows 11 for Arm in a supported way, including TPM and Secure Boot requirements and usable display and network drivers? |
| Windows 11 Home / Pro | not possible | later | later, blocked on spike X11-windows-hostX11-windows-host: Windows host through HCSOn Windows 11 Home with only the Virtual Machine Platform feature: can a standard user create, start, save, and restore a VM through HCS? |
| Linux, Ubuntu LTS first | not possible | later | later |
The code encodes this matrix in internal/platform and tests it.
What the matrix assumes
Section titled “What the matrix assumes”- macOS guests need Apple hardware, technically and by license.
- A macOS host needs macOS 27 or later (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).).
wb image buildboots the new guest with the guest provisioning options, which are new in macOS 27 (S06-02-image-buildS06-02-image-build: Image BuildHow wb image build makes a guest image: the build VM, its two provisioning stages, terminfo, sealing, and storage.). Building images on a newer Mac and shipping them to older hosts was rejected: it needs image signing and provenance that don’t exist, and Apple’s license may not allow it (I143I143 (closed): NFR04-host-platforms: macOS 27 host for wb image build (X17 decision 3)X17-image-build (PR #141, #28) found that wb image build needs a macOS 27 host.). - Guests use the host’s CPU architecture, with no instruction-set
emulation:
- arm64 on Apple Silicon;
- x86-64 or arm64 on Windows and Linux.
- Windows guests need a Windows license that the user supplies. Wraith Box never ships or downloads a Windows image itself.
- “Windows 11” means the current Home and Pro editions. Wraith Box doesn’t rely on features that only Pro or Enterprise have, such as the Hyper-V management stack or Windows Sandbox.
- Linux distributions other than Ubuntu LTS, as host or guest, are considered after Ubuntu works. The Linux code avoids Ubuntu-only assumptions where that is free.
| Page | What it covers |
|---|---|
| S12-01-platform-interfacesS12-01-platform-interfaces: Platform InterfacesHow platform-specific code is isolated behind interfaces, and what each host OS uses for each. | The interfaces that isolate platform code, what each host OS uses for each, and the rules for platform code |
| S12-02-languages-and-ciS12-02-languages-and-ci: Languages and CIThe language used on each platform, and how CI builds each platform. | The language used on each platform, and CI per platform |
| S12-03-host-prerequisitesS12-03-host-prerequisites: Host PrerequisitesWhat wb setup checks on each host, and how a development build on macOS gets signed. | What wb setup checks on each host, and signing of development builds on macOS |
| S12-04-guest-operating-systemsS12-04-guest-operating-systems: Guest Operating SystemsWhat differs per guest operating system. | What differs per guest OS |
| S12-05-wslS12-05-wsl: WSLHow wb works inside a WSL 2 distribution on a Windows host (FR16-wsl). | How wb works inside WSL |
Status: Draft