How openai/tart works
Tart is a macOS-on-Apple-Silicon virtualization toolset for creating, running, and managing macOS and Linux VMs, including use in CI. The main user workflow is to obtain or clone a VM image, store it locally, and run it through Apple’s Virtualization framework; VM configuration and platform-specific setup support that runtime. Separate command capabilities manage VM lifecycle, export/import, and OCI registry exchange. Relationships reflect README statements and source-index references or excerpts; several command and storage details are not sampled, so uncertain links are omitted.
Main entry points: Run.swift Run command · VMStorageOCI.swift OCI VM storage · VMStorageLocal.swift Local VM storage · VMConfig.swift VM configuration
Components 24
CLI workflows
- VM commands
Sources/tart/Commands - Run command
Sources/tart/Commands/Run.swift - Set command
Sources/tart/Commands/Set.swift - Prune command
Sources/tart/Commands/Prune.swift
VM runtime
- Tart config
Sources/tart/Config.swift - VM configuration
Sources/tart/VMConfig.swift - macOS platform
Sources/tart/Platform/Darwin.swift - Linux platform
Sources/tart/Platform/Linux.swift - Virtual machine
Sources/tart/VM.swift - VM networking
Sources/tart/Network - Softnet backend
Sources/tart/Network/Softnet.swift - VNC display
Sources/tart/VNC
VM and image storage
- Local VM storage
Sources/tart/VMStorageLocal.swift - OCI VM storage
Sources/tart/VMStorageOCI.swift - Storage dispatch
Sources/tart/VMStorageHelper.swift - VM directory
Sources/tart/VMDirectory.swift - Content store
Sources/tart/ContentStore.swift - Local layer cache
Sources/tart/LocalLayerCache.swift
OCI exchange
- OCI registry client
Sources/tart/OCI/Registry.swift - Remote image names
Sources/tart/OCI/RemoteName.swift - Image digests
Sources/tart/OCI/Digest.swift - Disk layerizer
Sources/tart/OCI/Layerizer/DiskV2.swift
Other components
- User / CI
- OCI-compatible registry
Connections 30
- User / CI → VM commands: manages VMs
- User / CI → Run command: runs VM
- Run command → VM configuration: configures
Sources/tart/Commands/Run.swift - Run command → Local VM storage: opens VM
Sources/tart/Commands/Run.swift - Run command → macOS platform: selects platform
Sources/tart/Commands/Run.swift - Run command → Linux platform: selects platform
Sources/tart/Commands/Run.swift - Run command → VM networking: configures networking
Sources/tart/Commands/Run.swift - Run command → Softnet backend: starts backend
Sources/tart/Commands/Run.swift - Run command → VNC display: configures display
Sources/tart/Commands/Run.swift - VM configuration → macOS platform: decodes platform
Sources/tart/VMConfig.swift - VM configuration → Linux platform: decodes platform
Sources/tart/VMConfig.swift - Set command → VM configuration: updates config
Sources/tart/Commands/Set.swift - Set command → Local VM storage: opens VM
Sources/tart/Commands/Set.swift - Local VM storage → VM directory: opens directory
Sources/tart/VMStorageLocal.swift - OCI VM storage → VM directory: materializes VM
Sources/tart/VMStorageOCI.swift - OCI VM storage → OCI registry client: pulls and pushes
Sources/tart/VMStorageOCI.swift - OCI VM storage → Remote image names: resolves names
Sources/tart/VMStorageOCI.swift - OCI VM storage → Content store: uses shared content
Sources/tart/VMStorageOCI.swift - OCI VM storage → Local layer cache: uses layer cache
Sources/tart/VMStorageOCI.swift - Storage dispatch → Local VM storage: dispatches local
Sources/tart/VMStorageHelper.swift - Storage dispatch → OCI VM storage: dispatches remote
Sources/tart/VMStorageHelper.swift - VM directory → Content store: uses content store
Sources/tart/VMDirectory.swift - OCI registry client → Image digests: uses digests
Sources/tart/OCI/Registry.swift - Disk layerizer → OCI registry client: transfers layers
Sources/tart/OCI/Layerizer/DiskV2.swift - Disk layerizer → Image digests: computes digests
Sources/tart/OCI/Layerizer/DiskV2.swift - Disk layerizer → Local layer cache: uses layer cache
Sources/tart/OCI/Layerizer/DiskV2.swift - OCI registry client → OCI-compatible registry: exchanges images
- Prune command → Local VM storage: prunes local VMs
Sources/tart/Commands/Prune.swift - Prune command → OCI VM storage: prunes remote cache
Sources/tart/Commands/Prune.swift - Tart config → VM directory: cleans temporary VMs
Sources/tart/Config.swift