Skip to the content.

Split backends: Apple Container CLI for Linux, Tart CLI for macOS

Linux Sandbox VMs use the Apple Container CLI backend (OCI images, fast create, existing implementation). macOS Sandbox VMs use a Tart CLI backend — Tart (Cirrus Labs, open source) wraps Apple’s Virtualization Framework and is the macOS analog of the Apple container CLI. Both backends have the same shape: shell out to a CLI that pulls an OCI image and runs it with sand-controlled directory mounts. We chose split backends over unifying everything under one runtime because each CLI is the best fit for its guest OS, and the SandboxBackend deep module hides the difference behind one interface.

We chose shelling out to Tart over linking the Virtualization Framework directly in sand’s own Swift code. Both are technically viable, but Tart already implements macOS install-from-IPSW, OCI-registry image distribution (including Xcode-preinstalled images), copy-on-write clone, directory sharing with read-only/read-write modes, SSH (tart ip), VNC, resource/disk configuration, and NAT/Softnet network isolation — every hard requirement sand has. Reimplementing that in-process would be substantial work and would force sand to carry the com.apple.security.virtualization entitlement and a signed-distribution pipeline. Delegating to Tart keeps sand unsigned and small, and is symmetric with the existing Linux backend.

Considered Options

Consequences