mirror of https://github.com/cirruslabs/tart.git
When built against the macOS 27 (Xcode 27, Swift 6.4) SDK, "tart run" brings up the VM window but the guest never boots. Swift's asynchronous main() entry point implicitly starts an executor that owns the main thread, and as of Swift 6.4 that executor is no longer backed by the Dispatch main queue. Running an AppKit/SwiftUI run loop nested inside it via MainApp.main() leaves the main run loop unable to drain Swift tasks or DispatchQueue.main, so the task that starts the VM is never scheduled, even though the window itself (driven directly by AppKit during launch) still appears. We now keep Root.main() synchronous, so that a command driving a run loop can own the main thread at the top level, exactly like a plain SwiftUI app. With AppKit owning the loop again, MainActor tasks and the Dispatch main queue drain as before. Such commands opt in through a new MainThreadCommand protocol; everything else keeps running asynchronously via a detached task and dispatchMain(). Verified that the guest boots again, and that Ctrl+C still stops the VM gracefully. |
||
|---|---|---|
| .ci | ||
| .github | ||
| Resources | ||
| Sources/tart | ||
| Tests/TartTests | ||
| benchmark | ||
| docs | ||
| integration-tests | ||
| scripts | ||
| .cirrus.yml | ||
| .editorconfig | ||
| .gitignore | ||
| .goreleaser.yml | ||
| .swiftformat | ||
| CONTRIBUTING.md | ||
| LICENSE | ||
| PROFILING.md | ||
| Package.resolved | ||
| Package.swift | ||
| README.md | ||
| actool.sh | ||
| gon.hcl | ||
| mkdocs.yml | ||
README.md
Tart is a virtualization toolset to build, run and manage macOS and Linux virtual machines (VMs) on Apple Silicon. Built by CI engineers for your automation needs. Here are some highlights of Tart:
- Tart uses Apple's own
Virtualization.Frameworkfor near-native performance. - Push/Pull virtual machines from any OCI-compatible container registry.
- Use Tart Packer Plugin to automate VM creation.
- Easily integrates with any CI system.
Many companies are using Tart in their internal setups. Here are just a few of them:
Note: If your company or project is using Tart please consider sharing with the community.
Usage
Try running a Tart VM on your Apple Silicon device running macOS 13.0 (Ventura) or later (will download a 25 GB image):
brew install cirruslabs/cli/tart
tart clone ghcr.io/cirruslabs/macos-tahoe-base:latest tahoe-base
tart run tahoe-base
Please check the official documentation for more information and/or feel free to use discussions for remaining questions.