diff --git a/CONTRIBUTING.md b/.github/CONTRIBUTING.md similarity index 93% rename from CONTRIBUTING.md rename to .github/CONTRIBUTING.md index 3b8fc20..3c12830 100644 --- a/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -37,8 +37,8 @@ what changed and what was actually verified, just like any other PR. Do not share credentials, personal information, or confidential logs. Contributed code and assets must be yours to submit. macbox's own code and documentation use the -[PolyForm Noncommercial License](LICENSE); upstream patches under -[`patches/`](patches/README.md) retain their separate licenses. Do not include +[PolyForm Noncommercial License](../LICENSE); upstream patches under +[`patches/`](../src/patches/README.md) retain their separate licenses. Do not include Apple software or other proprietary binaries. Thanks for contributing, whatever the size or topic. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index b9ec3b5..40c3480 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -18,4 +18,4 @@ Share the use case or problem this would solve. Links, prototypes, experiments, patches, examples, or anything else relevant. -No implementation required. All ideas are welcome. See [CONTRIBUTING.md](../../CONTRIBUTING.md). +No implementation required. All ideas are welcome. See [CONTRIBUTING.md](../CONTRIBUTING.md). diff --git a/.github/ISSUE_TEMPLATE/improvement_or_experiment.md b/.github/ISSUE_TEMPLATE/improvement_or_experiment.md index 533d5ab..0b3a75e 100644 --- a/.github/ISSUE_TEMPLATE/improvement_or_experiment.md +++ b/.github/ISSUE_TEMPLATE/improvement_or_experiment.md @@ -24,4 +24,4 @@ Hardware, OS, versions, dependencies or other setup details. Even partial experiments are welcome. If you have a working change, you can also [open a pull request](https://github.com/TUNA-NOPE/macbox/pulls). -See [CONTRIBUTING.md](../../CONTRIBUTING.md). +See [CONTRIBUTING.md](../CONTRIBUTING.md). diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index b88edc6..de5291d 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -1,4 +1,4 @@ -# Builds the website (site/) and publishes it to GitHub Pages: https://tuna-nope.github.io/macbox/ +# Builds the website (docs/site/) and publishes it to GitHub Pages: https://tuna-nope.github.io/macbox/ # Pull requests only build and check it; pushes to main deploy it, then tell IndexNow (Bing and # others) which pages exist. Google reads the sitemap through Search Console. name: Website @@ -6,9 +6,9 @@ name: Website on: push: branches: [main] - paths: ["site/**", "docs/images/**", "llms.txt", "macbox", "sims/bin/mac-sim", ".github/workflows/pages.yml"] + paths: ["docs/site/**", "docs/images/**", "macbox", "src/sims/bin/mac-sim", ".github/workflows/pages.yml"] pull_request: - paths: ["site/**", "docs/images/**", "llms.txt", "macbox", "sims/bin/mac-sim", ".github/workflows/pages.yml"] + paths: ["docs/site/**", "docs/images/**", "macbox", "src/sims/bin/mac-sim", ".github/workflows/pages.yml"] workflow_dispatch: permissions: @@ -27,11 +27,11 @@ jobs: with: python-version: "3.13" - name: Build and check - run: python3 site/build.py + run: python3 docs/site/build.py - uses: actions/upload-pages-artifact@v5 if: github.event_name != 'pull_request' with: - path: site/_site + path: docs/site/_site deploy: if: github.event_name != 'pull_request' diff --git a/AGENTS.md b/AGENTS.md index dfdcc6a..4fd728e 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -9,7 +9,7 @@ panel. You can do almost all of it yourself, including the steps in macOS's GUI. macbox welcomes contributions of any kind from users and coding agents: issues, ideas, new features, bug fixes, performance work, documentation, experiments, and more. If you identify or create a useful improvement while working with a user, point them -to [CONTRIBUTING.md](CONTRIBUTING.md), and offer to prepare an +to [CONTRIBUTING.md](.github/CONTRIBUTING.md), and offer to prepare an [issue](https://github.com/TUNA-NOPE/macbox/issues/new/choose) or [pull request](https://github.com/TUNA-NOPE/macbox/pulls). Do not publish an issue or PR on the user's behalf without their authorization; diff --git a/LICENSE b/LICENSE index 068d00f..67cb38d 100644 --- a/LICENSE +++ b/LICENSE @@ -76,4 +76,4 @@ Required Notice: Copyright 2026 TUNA-NOPE (https://github.com/TUNA-NOPE) Scope: these terms cover macbox's own files. The files in patches/ modify Reims vGPU and metal2vulkan, which are GPL-2.0-or-later OR LGPL-3.0-or-later, and are offered under those same terms; those in -patches/qemu modify QEMU and are GPL-2.0-or-later (patches/README.md). The projects macbox builds and downloads keep their own licenses (CREDITS.md). +src/patches/qemu modify QEMU and are GPL-2.0-or-later (src/patches/README.md). The projects macbox builds and downloads keep their own licenses (docs/credits.md). diff --git a/README.md b/README.md index 2dbaab0..51751cf 100644 --- a/README.md +++ b/README.md @@ -1,215 +1,104 @@ -# macbox +

macbox logo: an iPhone with a terminal prompt on its screen

-### The real iOS Simulator and Xcode on your Linux machine. GPU-accelerated. No Mac. +# macbox -macbox runs a full macOS VM in Docker that draws with **Metal on your Linux GPU**, so Xcode and -the iOS Simulator run on hardware you already have. An iPhone 17 Pro simulator at full 3x -resolution, in a heavy Liquid Glass scene, runs at **117 fps on an Intel integrated GPU**. Before -macbox's patches the same GPU managed 17. It's built for AI coding agents: Claude Code, Codex and -T3 Code each get their own simulator to build, run, tap, screenshot and record iOS apps on their own. -One command, `macbox`, builds it and runs it. +macbox gives your AI coding agents a Mac on Linux. It runs a full macOS VM in Docker that draws +with Metal on your own GPU, so Xcode and the real iOS Simulator run on the machine you already +have, with no Mac and no cloud service. Claude Code, Codex and T3 Code each get their own iPhone +simulator to build an app, run it, tap through it, take screenshots and record video, on their own. -| | | -|---|---| -| **117 fps** | iPhone 17 Pro simulator at 3x (1206×2622), Liquid Glass, on an Arrow Lake iGPU; 17.2 before | -| **3 at once** | three 3x simulators side by side, ~32 fps each | -| **No Mac, no cloud** | a Linux host with KVM and Docker; nothing billed per minute | -| **Agent-ready** | `mac-sim` gives every checkout its own simulator; `sim-fps` checks 60 fps; T3 Code's Device panel streams it live | +It's fast: an iPhone 17 Pro simulator at full 3x resolution renders a heavy Liquid Glass screen at +**117 fps on an Intel integrated GPU**. Before macbox's patches, the same GPU managed 17. -**Website and guides:** [tuna-nope.github.io/macbox](https://tuna-nope.github.io/macbox/): macOS, Xcode and -the iOS Simulator on Linux, Expo apps, the GPU path, and AI coding agents with T3 Code. +**Website:** [tuna-nope.github.io/macbox](https://tuna-nope.github.io/macbox/) ![The macOS 26 desktop in macbox on Linux: Simulator.app shows an iPhone 17 Pro running Nimbus, a weather app, next to Nimbus's website in Safari](docs/images/hero.jpg) -macOS 26 Tahoe's desktop in macbox on an Intel iGPU, captured as it is: Simulator.app with an -iPhone 17 Pro on iOS 26.5 running Nimbus, a weather app, beside its website in Safari. +macOS 26 Tahoe in macbox on an Intel iGPU, captured as it is: an iPhone 17 Pro simulator +running Nimbus, a weather app, beside its website in Safari. -``` -Linux host (KVM + a Vulkan GPU + Docker) -└─ container macbox - └─ QEMU with Reims vGPU ──► metal2vulkan ──► Vulkan (Mesa) on your GPU - └─ macOS 26 Tahoe (x86-64), drawn with Metal - ├─ Xcode, CocoaPods, Node - ├─ iOS Simulators: a pool, one per agent checkout (mac-sim) - └─ T3 Code's device hub (Intel build) ──► the Device panel, live -``` +## What it does - **macOS draws on your GPU.** [Reims vGPU](https://github.com/steelbrain/reims-vgpu) gives QEMU - Apple's paravirtual GPU, and macOS's own driver talks to it, so Metal works with no guest - driver. [metal2vulkan](https://github.com/steelbrain/metal2vulkan) runs Metal's work on Vulkan. - macbox builds both, with patches that took a 3x iOS Simulator from 17 to 117 fps on the GPU it - was measured on (see [Performance](#performance)). -- **The screen** opens in a window on your Linux desktop, or in a browser tab (Selkies: H.264 on - the GPU, its bitrate following the link). Agents can see it and click and type into it - (`macbox screenshot`, `click`, `type`), so an agent can drive the macOS installer too. -- **iOS Simulators for agents.** `mac-sim` gives each checkout its own simulator from a pool: - slim ones for most work, a full one for widgets, Live Activities and the Dynamic Island, a - sharp one for real-iPhone pixels. It builds the app on the Mac, runs Metro on the host, - taps, types, takes lossless screenshots and records video. `sim-fps` checks that a recording - held 60 fps with no dropped frames. A skill (`skills/simulators`) teaches Claude Code and Codex - to use it after every UI change. -- **T3 Code.** `macbox t3 register` adds the VM to T3 Code's Device panel, and `macbox t3 fix-hub` - rebuilds T3's device hub for Intel, so the panel streams the simulator live and takes taps. -- **Android too**, optionally: `android-sim` runs a pool of Android emulators on the host itself. + Apple's paravirtual GPU, so macOS's own driver works with no guest driver, and + [metal2vulkan](https://github.com/steelbrain/metal2vulkan) runs Metal's work on Vulkan. macbox + builds both with its own patches, which removed the copies between guest memory and the GPU. +- **iOS Simulators for agents.** `mac-sim` gives each checkout its own simulator from a pool. It + builds the app on the Mac, runs Metro on the host, taps, types, takes lossless screenshots and + records video. `sim-fps` checks that an animation held 60 fps. A skill teaches Claude Code and + Codex to check every UI change this way. +- **You can watch.** The Mac's screen opens in a window on your Linux desktop or in a browser tab, + and T3 Code's Device panel streams the simulator live and takes taps. +- **Agents can drive macOS itself:** `macbox screenshot`, `click` and `type`, so an agent can even + click through the macOS installer. +- **Android too, if you want it:** `android-sim` runs a pool of Android emulators on the host. ## What you need -| | | -|---|---| -| CPU | x86-64 with VT-x or AMD-V, and AVX2 | -| GPU | one with a Mesa Vulkan driver: **Intel** (measured: Arrow Lake iGPU) or **AMD** (supported by Reims, untested here). NVIDIA works with Reims but macbox's image doesn't ship NVIDIA's driver yet | -| RAM | 16 GB or more (the VM takes 8 to 16) | -| Disk | about 150 GB free, on an SSD or NVMe | -| OS | Linux with KVM (`/dev/kvm`), a render node (`/dev/dri/renderD*`), Docker (rootless is fine) or Podman | +- Linux on an x86-64 CPU with KVM and AVX2 +- A GPU with Mesa's Vulkan driver: Intel (measured on an Arrow Lake iGPU) or AMD (supported by + Reims, untested here) +- 16 GB of RAM or more, and about 150 GB free on an SSD +- Docker (rootless is fine) or Podman -macOS for Intel ends with macOS 26 Tahoe, and Apple ships iOS 27's simulators for Apple silicon -only. So macbox runs macOS 26, Xcode 26 and iOS 26 simulators, and that is the ceiling on x86-64. +macOS for Intel ends with macOS 26, so macbox runs macOS 26, Xcode 26 and iOS 26 simulators. -## Quick start +## Get started -```sh -git clone macbox && cd macbox -./macbox init # config in ~/.config/macbox/macbox.env, an SSH key, the ssh alias "macbox" -./macbox doctor # checks KVM, the GPU, vm.max_map_count, Docker, disk space -./macbox build # the image, then Reims vGPU + metal2vulkan + QEMU (20 to 60 minutes) -./macbox create # a VM; macOS downloads from Apple -./macbox up # then open http://127.0.0.1:6081/ (or: ./macbox view local) -./macbox next # what's done and the next step, until everything is ticked +The easy way: give your agent this repo and let it do the install, the clicks in macOS's setup +screens included. + +``` +Set up macbox on this machine: https://github.com/TUNA-NOPE/macbox. Follow its AGENTS.md and ask me before changing the host. ``` -Installing macOS takes a few steps inside the VM: erase the disk and install, set Metal's error -mode once from Recovery, create a user, turn on SSH. `macbox next` prints each one, and -[docs/setup.md](docs/setup.md) walks through all of it. After that it's commands again: +Or by hand: ```sh -./macbox provision # passwordless sudo, no sleep, Node, Ruby + CocoaPods, simslim... -./macbox xcode ~/Downloads/Xcode_26.6.xip # Xcode and the iOS Simulator runtime -./macbox disk nvme # the system disk on NVMe (faster) -./macbox pool # the iOS Simulator pool -./macbox t3 register # T3 Code's Device panel (then: macbox t3 fix-hub) -./macbox agents install # mac-sim, sim-fps, android-sim, the skills +git clone https://github.com/TUNA-NOPE/macbox && cd macbox +./macbox init # config and an SSH key +./macbox doctor # checks KVM, the GPU, Docker and disk space +./macbox build # the GPU stack (20 to 60 minutes) +./macbox create # a VM; macOS downloads from Apple +./macbox up # the screen: http://127.0.0.1:6081/ +./macbox next # what's done, and the next step ``` -Setting up with an agent: point it at [AGENTS.md](AGENTS.md). +`macbox next` walks you through the rest: installing macOS, Xcode, the simulator pool and the +agent tools. [docs/setup.md](docs/setup.md) has every step. ## Performance -Measured on an Intel Core Ultra 7 265 (its Arrow Lake iGPU), Mesa 26.2.4, macOS 26.7.1, -iOS 26.5, 8 vCPUs and 12 GB. GlassBench is a table scrolling under Liquid Glass bars and a -floating glass toolbar, counted at the simulator's own screen (frames per second; two runs). - iOS Simulator at 3x, Liquid Glass benchmark: 17.2 fps as upstream shipped it, 39.0 with the October 28 macbox build, 50.6 on November 5, 70.0 with Coherent, 117 with the build macbox makes now -| iOS Simulator at 3x (1206x2622, an iPhone's pixels), glass | fps | -|---|---| -| Reims 2ce3209, as upstream shipped it on 2026-10-26 | 17.2 | -| macbox, 2026-10-28: rendering guest-RAM textures in place | 38.5 / 39.5 | -| macbox, 2026-11-05: flat32 | 50.6 | -| macbox, 2026-11-05: + Coherent, zero-copy surfaces | 70.0 | -| **macbox now** (2026-11-09): + grouped completion, staged page-ups, inline checks | **117** (114–121; the screen's limit is 120) | - -| The build macbox makes now | | -|---|---| -| two 3x simulators at once | 51–54 fps each | -| three 3x simulators at once | 31–32 fps each | -| macOS desktop (3440x1440), dragging a window | 240 display-link ticks a second alone; 126 with a simulator running | -| copying frames back to guest RAM | 0.2% of what eager copies would cost: about 5 µs a frame | - -Coherent keeps the GPU's image of the simulator's and the desktop's surfaces ahead of guest RAM and -syncs a page only when the guest's CPU touches it, so the copies between them are gone. The rest -removed per-page mappings, per-batch completions and a scheduling round per batch. It's on by -default with an Arrow Lake iGPU, where it runs every day, and a crash guard falls back to the plain -path after a bad run. One rare GPU hang under repeated boots of three simulators is still open. -[docs/performance.md](docs/performance.md) has the details. - -The GPU is the limit: one 3x simulator takes about 7.7 ms of this iGPU's time per frame, and several -simulators share about 105 frames a second. On a faster GPU every number moves up. -[docs/performance.md](docs/performance.md) breaks a frame down (what is real rendering and what the -translation adds), lists what didn't help, and the known limits (an idle macOS display gets no -vblank from its driver, so an animation starts about 0.1 s late: -[reims-vgpu#141](https://github.com/steelbrain/reims-vgpu/issues/141)). - -## Questions people ask - -**Can I run the iOS Simulator on Linux?** Not by itself: it's part of Xcode, which needs macOS. macbox -runs macOS in a VM on Linux with the GPU attached, so the real Simulator runs on your own machine, -with no Mac, no cloud account and no per-minute bill. - -**How do I give Claude Code or Codex an iOS Simulator on a Linux server?** Set up macbox, then -`macbox agents install`. Agents get `mac-sim` (a simulator per checkout: build, run, tap, screenshot, -record), `sim-fps` (did that animation hold 60 fps?), and a skill that tells them when and how to use -them. [docs/agents.md](docs/agents.md). - -**Docker-OSX or OSX-KVM, but with GPU acceleration?** Those boot macOS in QEMU too, but macOS gets -Metal only when you pass a GPU it has drivers for through to the VM (VFIO), which takes that GPU -away from the host. Otherwise the desktop and the Simulator draw in software. macbox uses Reims vGPU -instead: Apple's own paravirtual GPU device, run on the host's Vulkan driver. The host keeps its GPU, -macOS gets Metal, and an integrated GPU is enough. - -**Can I build and run an Expo or React Native iOS app on Linux?** Yes. `mac-sim run` copies the -checkout into macOS, builds it with Xcode and CocoaPods, and installs it in the simulator. Metro runs -on Linux, so JavaScript edits arrive by Fast Refresh. `MODE=release` gives a Release build, and -`MODE=go` opens the app in Expo Go. - -**Does it work with T3 Code's Device panel?** Yes: the simulators stream live into the panel and take -taps ([docs/t3-code.md](docs/t3-code.md)). - -**Real iPhones and TestFlight?** `phone-build` makes `.ipa` builds (EAS's free cloud builds first, -then locally in the VM) and uploads to TestFlight. Signing for devices needs Apple's paid Developer -Program ([skills/phone-builds](skills/phone-builds/SKILL.md)). - -**What can't it do?** Run macOS 27, Xcode 27 or iOS 27's simulators, which Apple ships for Apple -silicon only. It also can't run macOS legally on non-Apple hardware (see below). - -## How it compares - -| | macbox | Docker-OSX, OSX-KVM | Cloud simulators | A Mac, or a remote Mac | -|---|---|---|---|---| -| Runs on | your Linux host | your Linux host | the provider's Macs | a Mac | -| Metal in macOS | yes, on the host's GPU through Vulkan | only with a GPU passed through to the VM | yes | yes | -| Cost | your hardware | your hardware | usually per minute or a plan | the Mac | -| Built for agents (a simulator per checkout, screenshots, recordings, a 60 fps check, a skill) | yes | no | varies | with tools such as agent-device | -| Newest iOS Simulator | 26.x (the x86-64 ceiling) | 26.x | the newest | the newest | -| Apple's macOS license | not on non-Apple hardware | not on non-Apple hardware | yes | yes | - -## Contributions welcome - -**macbox is open to ideas, fixes, and improvements of every kind.** If you're using it and -find a bug, have a feature request, add support for something new, make it faster, improve -the docs, or build your own enhancement, please share it. Big changes, small fixes, -experimental solutions, and reports of what didn't work are all valuable. - -[Open an issue](https://github.com/TUNA-NOPE/macbox/issues/new/choose) to report a problem, -suggest an idea, or share your findings. If you've already built a solution, -[open a pull request](https://github.com/TUNA-NOPE/macbox/pulls) so we can review it -for inclusion. You don't need a finished implementation to start a conversation. - -**Using an AI coding agent?** Contributions from agent-assisted workflows are welcome too. -If your agent finds a problem or creates a useful improvement, ask it to prepare an -issue or PR. See [CONTRIBUTING.md](CONTRIBUTING.md) for a few simple guidelines. +Measured on an Intel Core Ultra 7 265 (Arrow Lake iGPU) with an iPhone 17 Pro simulator at 3x +running GlassBench, a table scrolling under Liquid Glass. Its screen runs at 120 Hz, so one +simulator is close to the limit. Several simulators share the GPU: two run at about 52 fps each, +three at about 32. The GPU is the bottleneck, so a faster GPU moves every number up. +[docs/performance.md](docs/performance.md) breaks a frame down, lists what was tried, and covers +the known limits. ## Docs -| | | -|---|---| -| [docs/setup.md](docs/setup.md) | a new install, step by step | -| [docs/architecture.md](docs/architecture.md) | how the parts fit: container, QEMU, display, network, guest, simulators, T3 | -| [docs/performance.md](docs/performance.md) | the GPU patches, measurements, tuning, limits | -| [docs/t3-code.md](docs/t3-code.md) | T3 Code's Device panel for iOS and Android | -| [docs/agents.md](docs/agents.md) | the agent tools, the skill, the instructions to give agents | -| [docs/troubleshooting.md](docs/troubleshooting.md) | when something doesn't work | -| [guest/README.md](guest/README.md) | what runs inside macOS | -| [patches/README.md](patches/README.md) | the patch series on Reims vGPU, metal2vulkan and QEMU | -| [site/](site/README.md) | the website's source: the guides at https://tuna-nope.github.io/macbox/guides/ | +- [Setup, step by step](docs/setup.md) +- [How it works](docs/architecture.md): the container, QEMU, the display, the guest, the simulators +- [Performance](docs/performance.md): the GPU patches, measurements, tuning, limits +- [Agents](docs/agents.md) and [T3 Code's Device panel](docs/t3-code.md) +- [Troubleshooting](docs/troubleshooting.md) +- [The patches](src/patches/README.md) on Reims vGPU, metal2vulkan and QEMU + +Ideas, fixes, reports of what didn't work and agent-made PRs are all welcome: +[CONTRIBUTING.md](.github/CONTRIBUTING.md). ## Credits macbox is glue and tuning around other people's work, above all Reims vGPU, metal2vulkan, reims-util and their QEMU fork by Anees Iqbal ([steelbrain](https://github.com/steelbrain)). -[CREDITS.md](CREDITS.md) lists every project macbox builds, runs or downloads, and its license. +[docs/credits.md](docs/credits.md) lists every project macbox builds, runs or downloads, and its +license. ## License @@ -218,10 +107,10 @@ macbox's own code and documents are under the purpose: yourself, a hobby, research, teaching, a school, a charity, a public body. **Commercial use needs the author's permission**: open an issue to ask. -The patches in `patches/` modify Reims vGPU and metal2vulkan, and stay under those projects' terms, -`GPL-2.0-or-later OR LGPL-3.0-or-later`; those in `patches/qemu` modify QEMU and are -`GPL-2.0-or-later` ([patches/README.md](patches/README.md)). Everything macbox -builds or downloads keeps its own license ([CREDITS.md](CREDITS.md)). +The patches in `src/patches/` modify Reims vGPU and metal2vulkan, and stay under those projects' +terms, `GPL-2.0-or-later OR LGPL-3.0-or-later`; those in `src/patches/qemu` modify QEMU and are +`GPL-2.0-or-later` ([src/patches/README.md](src/patches/README.md)). Everything macbox builds or +downloads keeps its own license ([docs/credits.md](docs/credits.md)). ## Disclaimer diff --git a/docs/agents.md b/docs/agents.md index 2380a28..a2e4b64 100644 --- a/docs/agents.md +++ b/docs/agents.md @@ -14,11 +14,11 @@ measure. |---|---| | `mac-sim`, `mac-sim-remote`, `sim-fps`, `android-sim`, `android-gpu-desktop`, `phone-build`, `macbox` | links in `~/.local/bin` | | the `simulators`, `phone-builds` and `macbox` skills | links in `~/.claude/skills` and `~/.agents/skills` | -| the "Simulators" section of the instructions ([agents/simulators-snippet.md](../agents/simulators-snippet.md)) | between `` markers in `~/.claude/CLAUDE.md` and `~/.codex/AGENTS.md` (each backed up as `.bak-macbox`) | +| the "Simulators" section of the instructions ([src/agents/simulators-snippet.md](../src/agents/simulators-snippet.md)) | between `` markers in `~/.claude/CLAUDE.md` and `~/.codex/AGENTS.md` (each backed up as `.bak-macbox`) | | `mac-sim-idle.timer` | a user unit, enabled: idle pool simulators shut down after 20 minutes | Optional: a Claude Code hook that reminds the agent of the skill whenever a prompt mentions a -simulator ([agents/README.md](../agents/README.md)). `./macbox agents uninstall` removes the links +simulator ([src/agents/README.md](../src/agents/README.md)). `./macbox agents uninstall` removes the links and the timer (it leaves the instructions). ## What an agent does with it @@ -35,7 +35,7 @@ mac-sim record /tmp/a.mp4 10 & ...; wait; sim-fps /tmp/a.mp4 # record a flow, mac-sim down # give it back ``` -The [simulators skill](../skills/simulators/SKILL.md) is the rulebook: which simulator for what, how +The [simulators skill](../src/skills/simulators/SKILL.md) is the rulebook: which simulator for what, how to show it to the user in T3 Code's Device panel, and the loop to run after every UI change. Run it, screenshot it and look, record the whole flow, and check with `sim-fps` that every stretch of motion held 60 fps with no dropped frames. Then inspect the frames. Measure motion on a 1x @@ -62,7 +62,7 @@ android-sim up && android-sim run && android-sim shot /tmp/a.png && android-sim It needs the Android SDK (`ANDROID_HOME`, default `~/Android/Sdk`, with cmdline-tools), a JDK 17 for builds, `/dev/kvm`, and agent-device. For GPU rendering, `android-gpu-desktop` runs a hidden sway -with Xwayland on the GPU for the emulators (`sims/systemd/android-gpu-desktop.service`); without it +with Xwayland on the GPU for the emulators (`src/sims/systemd/android-gpu-desktop.service`); without it they render in software. Settings are in the same config file: | Setting | Default | @@ -77,4 +77,4 @@ they render in software. Settings are in the same config file: The `phone-builds` skill and `phone-build` cover builds for a real device: an `.ipa` for an iPhone, TestFlight, an `.apk`. It uses Expo's EAS while the month's free cloud builds last, then builds locally: Android on the host, iOS in the macOS VM. iOS device builds need a paid Apple Developer -Program membership. See [skills/phone-builds/SKILL.md](../skills/phone-builds/SKILL.md). +Program membership. See [src/skills/phone-builds/SKILL.md](../src/skills/phone-builds/SKILL.md). diff --git a/docs/architecture.md b/docs/architecture.md index 4ed355e..3e665d0 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -23,7 +23,7 @@ host (Linux, KVM, a Vulkan GPU) ## The container -One image, `macbox:run` ([docker/Dockerfile](../docker/Dockerfile)), builds and runs everything: +One image, `macbox:run` ([src/docker/Dockerfile](../src/docker/Dockerfile)), builds and runs everything: Ubuntu 26.10 (for Mesa 26.2 and Python 3.14), the build tools for Reims vGPU and QEMU, and the run stack (passt, sway, wayvnc, noVNC, VA-API drivers). Selkies installs into a venv under `MACBOX_HOME` on first use. @@ -38,9 +38,9 @@ It runs with seccomp and AppArmor unconfined, because passt needs a user namespa ## Builds -`container/build-reims.sh` (run by `macbox build` in a throwaway container) checks out Reims vGPU, -QEMU and metal2vulkan at the commits [versions.env](../versions.env) pins, applies -[patches/](../patches/README.md) to each of the three, points Reims's Cargo at the patched metal2vulkan, and builds +`src/container/build-reims.sh` (run by `macbox build` in a throwaway container) checks out Reims vGPU, +QEMU and metal2vulkan at the commits [src/versions.env](../src/versions.env) pins, applies +[patches/](../src/patches/README.md) to each of the three, points Reims's Cargo at the patched metal2vulkan, and builds `reims-ctl`, the library (`cargo xtask dist --platform vulkan`) and QEMU on it. Each QEMU goes into `~/.local/share/reims-ctl/qemu/--macbox` and `qemu/current` moves to it. A running VM keeps its QEMU until it restarts, and old builds stay for going back @@ -86,14 +86,14 @@ Selkies follow it. ## Driving the GUI -`macbox screenshot | click | move | scroll | type | key | wait` run [lib/vmctl.py](../lib/vmctl.py) +`macbox screenshot | click | move | scroll | type | key | wait` run [src/lib/vmctl.py](../src/lib/vmctl.py) in the container against QEMU's QMP socket: screendumps, and absolute mouse and keyboard events. That is enough for an agent to install macOS, go through Setup Assistant and turn on SSH by itself. `type -` reads the text from stdin, so a password never shows in a process list. ## The guest -Everything inside macOS comes from [guest/](../guest/README.md), copied to `~/.macbox` by +Everything inside macOS comes from [guest/](../src/guest/README.md), copied to `~/.macbox` by `macbox provision` and run as `~/.macbox/macbox-guest ` over SSH. Each step is idempotent. ## The simulators @@ -129,17 +129,19 @@ path, name and size is a setting there, so two macboxes on one host only need di ``` macbox the CLI -versions.env the pinned upstream commits -docker/ the image (Dockerfile, sway.conf) -container/ scripts that run inside the container: build-reims.sh, display-up.sh, stream-up.sh -lib/vmctl.py screenshots, mouse and keyboard through QMP -patches/ the series on Reims vGPU, metal2vulkan and QEMU -guest/ everything copied into macOS (macbox-guest and its tools) -sims/ the agent tools on the host (mac-sim, sim-fps, android-sim) and their user units -skills/ the simulators, phone-builds and macbox (setup) skills -agents/ the instructions snippet and the Claude Code hook -bench/ the benchmark tools (simfps, GlassBench, GenieBench) -docs/ these documents; docs/images: the README's pictures and make-chart.py -llms.txt, AGENTS.md entry points for language models and for an agent setting macbox up +AGENTS.md the entry point for an agent setting macbox up +src/versions.env the pinned upstream commits +src/docker/ the image (Dockerfile, sway.conf) +src/container/ scripts that run inside the container: build-reims.sh, display-up.sh, stream-up.sh +src/lib/vmctl.py screenshots, mouse and keyboard through QMP +src/patches/ the series on Reims vGPU, metal2vulkan and QEMU +src/guest/ everything copied into macOS (macbox-guest and its tools) +src/sims/ the agent tools on the host (mac-sim, sim-fps, android-sim) and their user units +src/skills/ the simulators, phone-builds and macbox (setup) skills +src/agents/ the instructions snippet and the Claude Code hook +src/bench/ the benchmark tools (simfps, GlassBench, GenieBench) +docs/ these documents; docs/images: the pictures, the logo and make-chart.py +docs/site/ the website and llms.txt +.github/ the website's workflow, issue templates, CONTRIBUTING.md ``` diff --git a/CREDITS.md b/docs/credits.md similarity index 99% rename from CREDITS.md rename to docs/credits.md index cc41631..c726be2 100644 --- a/CREDITS.md +++ b/docs/credits.md @@ -50,4 +50,4 @@ the frames) follows the principles of [Appllama](https://appllama.io)'s app desi ## Apple macOS, Xcode and the iOS Simulator runtimes are Apple's, downloaded from Apple under Apple's -terms; macbox contains none of them. See the legal note in the [README](README.md#disclaimer). +terms; macbox contains none of them. See the legal note in the [README](../README.md#disclaimer). diff --git a/docs/images/logo.svg b/docs/images/logo.svg new file mode 100644 index 0000000..1f332cd --- /dev/null +++ b/docs/images/logo.svg @@ -0,0 +1,19 @@ + + macbox + + + + + + + + + + + + + + + + + diff --git a/docs/images/social-preview.jpg b/docs/images/social-preview.jpg index 29f5eb0..38762ff 100644 Binary files a/docs/images/social-preview.jpg and b/docs/images/social-preview.jpg differ diff --git a/docs/performance.md b/docs/performance.md index 866b0c3..96e8c41 100644 --- a/docs/performance.md +++ b/docs/performance.md @@ -13,7 +13,7 @@ Before macbox's patches, most of that added work was copies: macOS's framebuffer simulator's display surface lie in guest RAM, and metal2vulkan copied each into a GPU image and back around every render pass. Those shadow copies were 51% of all GPU time with the simulator and 67% with the desktop. Patch 0004 renders those textures in place, and Coherent (patches 0009 onwards, -with QEMU's census) removes most of the copies left ([patches/README.md](../patches/README.md)). +with QEMU's census) removes most of the copies left ([src/patches/README.md](../src/patches/README.md)). What is left of a 3x simulator frame, measured with the pass timer on 2026-11-09: | GPU time per 3x frame (~7.7–8.2 ms) | ms | | @@ -104,7 +104,7 @@ Inside macOS, emulated SATA → NVMe: a warm 4K random read 0.54 → 0.36 ms, an latency again. How they were measured: -- `simfps` (in `guest/bench`, if present) counts the frames a simulator's screen produces through +- `simfps` (in `src/guest/bench`, if present) counts the frames a simulator's screen produces through CoreSimulator's framebuffer, with no encoder in the way. - GPU time per frame from QEMU's DRM fdinfo. - Warm-up pass first; nothing else animating; Simulator.app closed. diff --git a/docs/setup.md b/docs/setup.md index df86c43..0196b44 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -57,7 +57,7 @@ Fix every FAIL. WARN lines are advice. This builds the Docker image (`macbox:run`: Ubuntu 26.10, Mesa, sway, passt, the stream's dependencies), then, in a container, Reims vGPU and its QEMU on metal2vulkan with macbox's patches -([patches/README.md](../patches/README.md)), and `reims-ctl` and `reims-util`. The first build +([src/patches/README.md](../src/patches/README.md)), and `reims-ctl` and `reims-util`. The first build takes 20 to 60 minutes and about 25 GB; later ones are incremental. `./macbox build --upstream` builds Reims's current master as it is, without macbox's patches. @@ -154,7 +154,7 @@ up to twice as fast. OpenCore finds the disk by itself. ./macbox provision ``` -Copies `guest/` to `~/.macbox` on the Mac and runs it ([guest/README.md](../guest/README.md)): +Copies `guest/` to `~/.macbox` on the Mac and runs it ([src/guest/README.md](../src/guest/README.md)): passwordless sudo (it asks for the password once), no sleep or screen lock, Spotlight indexing and automatic update downloads off, Node, Ruby 3.4 and CocoaPods, simslim, the `setmode` tool, and the LaunchAgent that keeps the Device panel's stream light. Safe to run again. @@ -212,7 +212,7 @@ hub's own source. Run it again after T3 updates its hub. [docs/t3-code.md](t3-co Links `mac-sim`, `sim-fps`, `android-sim` and `macbox` into `~/.local/bin`, the `simulators` (and `phone-builds`) skill into `~/.claude/skills` and `~/.agents/skills`, and enables the timer that -shuts idle simulators down. Add [agents/simulators-snippet.md](../agents/simulators-snippet.md) to your +shuts idle simulators down. Add [src/agents/simulators-snippet.md](../src/agents/simulators-snippet.md) to your `~/.claude/CLAUDE.md` and `~/.codex/AGENTS.md`. [docs/agents.md](agents.md) explains it. Check it from any Expo app's checkout: diff --git a/site/.gitignore b/docs/site/.gitignore similarity index 100% rename from site/.gitignore rename to docs/site/.gitignore diff --git a/site/README.md b/docs/site/README.md similarity index 52% rename from site/README.md rename to docs/site/README.md index 42fbbe3..b818f09 100644 --- a/site/README.md +++ b/docs/site/README.md @@ -5,23 +5,19 @@ nothing to install) and published to GitHub Pages by `.github/workflows/pages.ym to main that touches it. ```sh -python3 site/build.py # build into site/_site and check it -python3 site/build.py --serve # the same, then http://127.0.0.1:8000/macbox/ +python3 docs/site/build.py # build into docs/site/_site and check it +python3 docs/site/build.py --serve # the same, then http://127.0.0.1:8000/macbox/ ``` | | | |---|---| -| `pages/` | one HTML fragment per page. A header of `key: value` lines, then `---`. The file's path is the URL: `pages/guides/xcode-on-linux.html` is `/guides/xcode-on-linux/` | +| `pages/` | one HTML fragment per page (the home page and the 404). A header of `key: value` lines, then `---`. The file's path is the URL | | `layout.html`, `style.css` | the frame around every page; the CSS is inlined | -| `static/` | copied as is: the favicon, the IndexNow key, search engines' verification files, and the home page's pictures in `static/images/`: `desk-*` is a real, uncropped capture of the macOS VM's whole screen (1600x1200: Simulator.app running Nimbus, a demo weather app made for these pictures, next to its website in Safari), saved as `-quality 84 desk-1600.webp`, `-resize 800x -quality 82 desk-800.webp` and `-quality 84 -interlace JPEG desk-1600.jpg`; `phone-today.webp` and `phone-cities.webp` are Nimbus's two screens from `mac-sim shot` on the 3x `sharp` simulator, `-resize 600x -quality 86`. The logos on the home page are inline SVG: Claude's from Simple Icons, OpenAI's and T3 Code's from T3 Code's repository) | +| `static/` | copied as is: the favicon, the IndexNow key, search engines' verification files, and the home page's pictures in `static/images/`: `desk-*` is a real, uncropped capture of the macOS VM's whole screen (1600x1200: Simulator.app running Nimbus, a demo weather app made for these pictures, next to its website in Safari), saved as `-quality 84 desk-1600.webp`, `-resize 800x -quality 82 desk-800.webp` and `-quality 84 -interlace JPEG desk-1600.jpg`; the favicon is `docs/images/logo.svg`. The logos on the home page are inline SVG: Claude's from Simple Icons, OpenAI's and T3 Code's from T3 Code's repository) | -The repo stays the source of truth. The guides answer one question each and link to `docs/` for the -full reference; pictures (`docs/images`) and `llms.txt` are copied from the repo at build time, not -kept twice. When a command or a number changes in the docs, change it in the guides that show it. - -**Adding a guide:** a new file in `pages/guides/` with `title`, `short` (the breadcrumb), -`description` (50 to 165 characters, unique), `kind: guide`, `order` and `updated: YYYY-MM-DD`. -The guide lists, the sitemap and the structured data pick it up. Add it to `llms.txt` too. +The site is one page on purpose: what macbox is, the picture, and how to set it up. Everything +else lives in the repo's docs. The logo, the social preview and `llms.txt` are copied from the repo +at build time (`docs/images`, `docs/site/llms.txt`), not kept twice. **The build fails on:** a broken internal link or `#anchor`, a missing or duplicate title or description, a page without exactly one `

`, and a `macbox ` or `mac-sim ` in diff --git a/site/build.py b/docs/site/build.py similarity index 95% rename from site/build.py rename to docs/site/build.py index 5df4a0f..016398e 100644 --- a/site/build.py +++ b/docs/site/build.py @@ -1,14 +1,14 @@ #!/usr/bin/env python3 -"""Builds macbox's website (GitHub Pages) into site/_site. Standard library only. +"""Builds macbox's website (GitHub Pages) into docs/site/_site. Standard library only. - python3 site/build.py build, then check the output (fails on any problem) - python3 site/build.py --serve build, then serve it at http://127.0.0.1:8000/macbox/ (PORT=... for another port) + python3 docs/site/build.py build, then check the output (fails on any problem) + python3 docs/site/build.py --serve build, then serve it at http://127.0.0.1:8000/macbox/ (PORT=... for another port) -Pages are HTML fragments in site/pages/, each with a header of `key: value` lines ended by `---` +Pages are HTML fragments in docs/site/pages/, each with a header of `key: value` lines ended by `---` (title, description, and for guides: kind: guide, short, updated). A page's URL is its path: pages/guides/xcode-on-linux.html -> /guides/xcode-on-linux/. Links inside pages are written from the site's root (href="/guides/"); the build prefixes BASE_PATH. Pictures and llms.txt come -from the repo itself (docs/images, llms.txt), so they have one source. +from the repo itself (docs/images), so they have one source. """ import datetime, html, json, os, re, shutil, sys from pathlib import Path @@ -20,16 +20,14 @@ NAME = "macbox" HERE = Path(__file__).resolve().parent -ROOT = HERE.parent +ROOT = HERE.parent.parent # the repo OUT = HERE / "_site" FROM_REPO = { # repo file -> path in the site "docs/images/social-preview.jpg": "images/social-preview.jpg", - "docs/images/fps-light.svg": "images/fps-light.svg", - "docs/images/fps-dark.svg": "images/fps-dark.svg", - "llms.txt": "llms.txt", + "docs/images/logo.svg": "images/logo.svg", + "docs/site/llms.txt": "llms.txt", } -NAV = [("/", "Overview"), ("/guides/", "Guides"), ("/#performance", "Performance"), - (REPO_URL + "/blob/main/docs/setup.md", "Docs")] +NAV = [(REPO_URL + "/blob/main/docs/setup.md", "Docs")] def read_page(path): @@ -307,7 +305,7 @@ def check(pages): problems = [] seen_titles, seen_desc = {}, {} macbox_cmds = cli_commands("macbox") - macsim_cmds = cli_commands("sims/bin/mac-sim") + macsim_cmds = cli_commands("src/sims/bin/mac-sim") files = {str(f.relative_to(OUT)) for f in OUT.rglob("*") if f.is_file()} for p in pages: for key in ("title", "description"): diff --git a/site/layout.html b/docs/site/layout.html similarity index 75% rename from site/layout.html rename to docs/site/layout.html index 3256d02..14e91a9 100644 --- a/site/layout.html +++ b/docs/site/layout.html @@ -21,7 +21,7 @@ - + {{verification}} {{json_ld}} @@ -31,7 +31,7 @@
- macbox + macbox GitHub
@@ -51,14 +51,7 @@ Setup guide Troubleshooting Issues - Credits - - diff --git a/llms.txt b/docs/site/llms.txt similarity index 67% rename from llms.txt rename to docs/site/llms.txt index b73681e..e5b4e53 100644 --- a/llms.txt +++ b/docs/site/llms.txt @@ -13,7 +13,7 @@ performance work, tests, documentation, experiments, or improvements built with Invite the user to share discoveries or code upstream, and ask for their approval before publishing on their behalf. -- [Contributing guide](https://github.com/TUNA-NOPE/macbox/blob/main/CONTRIBUTING.md) +- [Contributing guide](https://github.com/TUNA-NOPE/macbox/blob/main/.github/CONTRIBUTING.md) - [Open an issue](https://github.com/TUNA-NOPE/macbox/issues/new/choose) - [Open a pull request](https://github.com/TUNA-NOPE/macbox/pulls) @@ -25,28 +25,21 @@ publishing on their behalf. ## Using it from an agent -- [The simulators skill](https://github.com/TUNA-NOPE/macbox/blob/main/skills/simulators/SKILL.md): mac-sim and android-sim commands, T3 Code's Device panel, the verify-every-UI-change loop with sim-fps +- [The simulators skill](https://github.com/TUNA-NOPE/macbox/blob/main/src/skills/simulators/SKILL.md): mac-sim and android-sim commands, T3 Code's Device panel, the verify-every-UI-change loop with sim-fps - [Agents guide](https://github.com/TUNA-NOPE/macbox/blob/main/docs/agents.md): installing the tools, the skill and the instructions - [T3 Code's Device panel](https://github.com/TUNA-NOPE/macbox/blob/main/docs/t3-code.md) -- [Phone builds](https://github.com/TUNA-NOPE/macbox/blob/main/skills/phone-builds/SKILL.md): .ipa / TestFlight / .apk with EAS, cloud first then local +- [Phone builds](https://github.com/TUNA-NOPE/macbox/blob/main/src/skills/phone-builds/SKILL.md): .ipa / TestFlight / .apk with EAS, cloud first then local ## How it works - [Architecture](https://github.com/TUNA-NOPE/macbox/blob/main/docs/architecture.md): the container, QEMU and Reims vGPU, the display stream, the network, the guest, the simulator pool - [Performance](https://github.com/TUNA-NOPE/macbox/blob/main/docs/performance.md): the patches (in place rendering, flat32, Coherent zero-copy surfaces, grouped completion, staged page-ups), measurements for one to three simulators and the desktop, a frame broken down, tuning, known limits -- [Patches](https://github.com/TUNA-NOPE/macbox/blob/main/patches/README.md) +- [Patches](https://github.com/TUNA-NOPE/macbox/blob/main/src/patches/README.md) - [Troubleshooting](https://github.com/TUNA-NOPE/macbox/blob/main/docs/troubleshooting.md) -- [Credits](https://github.com/TUNA-NOPE/macbox/blob/main/CREDITS.md) +- [Credits](https://github.com/TUNA-NOPE/macbox/blob/main/docs/credits.md) ## Website -The same project as a website, with task guides. Each page has a Markdown copy at `index.md` in the same folder. +The same project as a one-page website, with a Markdown copy at `index.md`. -- [Overview](https://tuna-nope.github.io/macbox/index.md): what macbox is, features, measured performance, comparison, requirements, quick start -- [How to run macOS on Linux with GPU acceleration](https://tuna-nope.github.io/macbox/guides/run-macos-on-linux/index.md) -- [How to run Xcode on Linux](https://tuna-nope.github.io/macbox/guides/xcode-on-linux/index.md) -- [iOS Simulator on Linux](https://tuna-nope.github.io/macbox/guides/ios-simulator-on-linux/index.md) -- [Expo and React Native iOS apps on Linux](https://tuna-nope.github.io/macbox/guides/expo-react-native-ios-on-linux/index.md) -- [iOS Simulators for AI coding agents: Claude Code, Codex, T3 Code](https://tuna-nope.github.io/macbox/guides/ios-simulator-for-ai-coding-agents/index.md) -- [GPU-accelerated macOS VM on Linux, without passthrough](https://tuna-nope.github.io/macbox/guides/gpu-accelerated-macos-vm-on-linux/index.md) -- [macbox vs Docker-OSX and OSX-KVM](https://tuna-nope.github.io/macbox/guides/macbox-vs-docker-osx-and-osx-kvm/index.md) +- [Overview](https://tuna-nope.github.io/macbox/index.md): what macbox is, what you need, how to set it up diff --git a/site/pages/404.html b/docs/site/pages/404.html similarity index 52% rename from site/pages/404.html rename to docs/site/pages/404.html index 3bae94d..4de9624 100644 --- a/site/pages/404.html +++ b/docs/site/pages/404.html @@ -1,13 +1,12 @@ title: Page not found -description: This page doesn't exist on macbox's site. Try the guides, or the repository on GitHub, for macOS, Xcode and the iOS Simulator on Linux. +description: This page doesn't exist on macbox's site. Go to the home page or the repository on GitHub: macOS, Xcode and the iOS Simulator on Linux. ---

404

That page isn't here

-

It may have moved. Everything macbox has is one of these:

+

It may have moved. Try one of these:

diff --git a/docs/site/pages/index.html b/docs/site/pages/index.html new file mode 100644 index 0000000..d9dc75f --- /dev/null +++ b/docs/site/pages/index.html @@ -0,0 +1,58 @@ +title: macbox: give your AI agents a Mac and iOS Simulators on Linux +description: macbox runs macOS, Xcode and iOS Simulators on your Linux machine with your own GPU, so Claude Code, Codex and T3 Code can build, tap and test your iPhone app. +--- +
+
+

macbox

+

Give your agents a Mac.

+

macOS, Xcode and real iPhone simulators at up to 120 fps, on your Linux machine and its own GPU. Your coding agent builds the app, taps through it and checks it for itself.

+ +

Works with

    +
  • Claude Code
  • +
  • Codex
  • +
  • T3 Code
  • +
+
+
+ + + The macOS 26 desktop in macbox on Linux: Simulator.app shows an iPhone 17 Pro running Nimbus, a weather app, next to Nimbus's website in Safari + +
The full, uncropped screen of macOS 26 in macbox, running on Linux with an Intel integrated GPU. Nimbus is a demo app built for this page.
+
+
+ +
+
+
+

Let your agent set it up.

+

macbox is written so an agent can do the whole install, the clicks in macOS's setup screens included. Paste this into Claude Code, Codex or T3 Code:

+
+
Set up macbox on this machine: https://github.com/TUNA-NOPE/macbox. Follow its AGENTS.md and ask me before changing the host.
+

It asks before it installs anything on the host, and needs two things from you: a macOS password, which you type into the VM's screen, and the Xcode download from Apple, which needs your Apple Account. Plan on an afternoon, mostly downloads and builds.

+
+

You'll need

+
    +
  • Linux on an x86-64 CPU with KVM and AVX2
  • +
  • An Intel or AMD GPU with Mesa's Vulkan driver
  • +
  • 16 GB of RAM and about 150 GB free on an SSD
  • +
  • Docker (rootless is fine) or Podman
  • +
+

macbox runs macOS 26 and iOS 26 simulators: the last versions Apple makes for Intel. NVIDIA isn't packaged yet, and AMD is supported upstream but untested here.

+
+
+ Or do it yourself +
git clone https://github.com/TUNA-NOPE/macbox && cd macbox
+./macbox init      # config and an SSH key
+./macbox doctor    # checks KVM, the GPU, Docker, disk
+./macbox build     # the GPU stack (20 to 60 min)
+./macbox create    # a VM; macOS downloads from Apple
+./macbox up        # the screen: http://127.0.0.1:6081/
+./macbox next      # what's done, and the next step
+

./macbox next always says what's done and what's next. The full walkthrough

+
+
+
diff --git a/site/static/d0f80829b645869eb473963b6ad2dd95.txt b/docs/site/static/d0f80829b645869eb473963b6ad2dd95.txt similarity index 100% rename from site/static/d0f80829b645869eb473963b6ad2dd95.txt rename to docs/site/static/d0f80829b645869eb473963b6ad2dd95.txt diff --git a/docs/site/static/favicon.svg b/docs/site/static/favicon.svg new file mode 100644 index 0000000..1f332cd --- /dev/null +++ b/docs/site/static/favicon.svg @@ -0,0 +1,19 @@ + + macbox + + + + + + + + + + + + + + + + + diff --git a/site/static/google2a79202c4df40a46.html b/docs/site/static/google2a79202c4df40a46.html similarity index 100% rename from site/static/google2a79202c4df40a46.html rename to docs/site/static/google2a79202c4df40a46.html diff --git a/site/static/images/desk-1600.jpg b/docs/site/static/images/desk-1600.jpg similarity index 100% rename from site/static/images/desk-1600.jpg rename to docs/site/static/images/desk-1600.jpg diff --git a/site/static/images/desk-1600.webp b/docs/site/static/images/desk-1600.webp similarity index 100% rename from site/static/images/desk-1600.webp rename to docs/site/static/images/desk-1600.webp diff --git a/site/static/images/desk-800.webp b/docs/site/static/images/desk-800.webp similarity index 100% rename from site/static/images/desk-800.webp rename to docs/site/static/images/desk-800.webp diff --git a/site/style.css b/docs/site/style.css similarity index 98% rename from site/style.css rename to docs/site/style.css index 4c13b17..64dff62 100644 --- a/site/style.css +++ b/docs/site/style.css @@ -238,3 +238,7 @@ td strong { color: var(--ink); font-weight: 600; } .fine a { color: var(--ink2); } @media (max-width: 760px) { .cols { grid-template-columns: 1fr 1fr; } .cols > div { grid-column: 1 / -1; } } @media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } } + +.hero .eyebrow{display:flex;flex-direction:column;align-items:center;gap:14px} +.hero .eyebrow .mark{width:72px;height:72px;filter:drop-shadow(0 8px 24px rgba(91,77,230,.28))} +.brand img{display:block;border-radius:6px} diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index d203f0d..e707b05 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -8,7 +8,7 @@ with `REIMS_VGPU_STATS=1`, a line of frame statistics a second), `./macbox logs | Symptom | | |---|---| -| `a patch does not apply` | `versions.env` and `patches/` belong together; a local edit to one of them breaks the other. `git status` in the checkout | +| `a patch does not apply` | `src/versions.env` and `src/patches/` belong together; a local edit to one of them breaks the other. `git status` in the checkout | | `only N GB free` | the build needs about 25 GB in `MACBOX_HOME`. `FORCE=1 ./macbox build` tries anyway | | QEMU's configure stops on a missing package | the image changed under it: `./macbox build` again rebuilds the image first | | the build stops at rustup | `MACBOX_HOME/build/rustup.log`; rustup needs https://sh.rustup.rs and static.rust-lang.org | diff --git a/macbox b/macbox index 4b4c056..48957fa 100755 --- a/macbox +++ b/macbox @@ -114,7 +114,7 @@ drop_managed() { # drop_managed : the lines macbox writes, so a chan apply_tuning() { # before each start local live="$RUN/live.conf" k if tuning_on; then - [ -s "$live" ] || printf '# metal2vulkan live switches (patches/metal2vulkan), re-read every second\nhost_rt_in_place=1\n' >"$live" + [ -s "$live" ] || printf '# metal2vulkan live switches (src/patches/metal2vulkan), re-read every second\nhost_rt_in_place=1\n' >"$live" drop_managed "$live" local env=(--env "M2V_LIVE=$live" --env REIMS_VGPU_PRIVATE_SKIP_PAGE_UP=1) if gpu_is_arl; then env+=(--env "M2V_ARL_FACTS=$ARL_FACTS"); else env+=(--env "M2V_ARL_FACTS="); fi @@ -299,12 +299,12 @@ cmd_doctor() { cmd_build() { need_init say "== image $MACBOX_IMAGE" - $DOCKER build -t "$MACBOX_IMAGE" "$REPO/docker" + $DOCKER build -t "$MACBOX_IMAGE" "$REPO/src/docker" local e; mapfile -t e < <(cenv) say "== Reims vGPU, metal2vulkan and QEMU (20 to 60 minutes the first time)" local pin=(); [ -n "${MACBOX_BUILD_CPUSET:-}" ] && pin=(taskset -c "$MACBOX_BUILD_CPUSET") $DOCKER run --rm "${e[@]}" -v "$MACBOX_HOME:$MACBOX_HOME" -v "$REPO:$REPO:ro" "$MACBOX_IMAGE" \ - "${pin[@]}" nice -n 10 bash "$REPO/container/build-reims.sh" "$@" + "${pin[@]}" nice -n 10 bash "$REPO/src/container/build-reims.sh" "$@" if vm_running; then say "the running VM keeps its QEMU; the new build starts with the next macbox down && macbox up"; fi } @@ -341,7 +341,7 @@ cmd_up() { wd=/tmp/host-wayland/wayland-0 in_c mkdir -p -m 700 /tmp/xdg # the window's XDG_RUNTIME_DIR (vm.toml), which sway makes otherwise else - wd=$(in_c "$REPO/container/display-up.sh" | sed -n 's/^WAYLAND_DISPLAY=//p') + wd=$(in_c "$REPO/src/container/display-up.sh" | sed -n 's/^WAYLAND_DISPLAY=//p') fi if ! vm_running; then ctl set "$MACBOX_VM" --env "WAYLAND_DISPLAY=$wd" --extra-args "$(qemu_extra)" >/dev/null @@ -376,7 +376,7 @@ cmd_status() { local pid; pid=$(qemu_pid) [ -n "$pid" ] && ps -o pid,pcpu,rss,etime -p "$pid" | sed 's/^/ /' in_c test -S /tmp/host-wayland/wayland-0 && say " view: local (a window on the host's desktop)" || - { say " view: stream, http://127.0.0.1:$MACBOX_SCREEN_PORT/"; in_c "$REPO/container/stream-up.sh" status | sed 's/^/ /'; } + { say " view: stream, http://127.0.0.1:$MACBOX_SCREEN_PORT/"; in_c "$REPO/src/container/stream-up.sh" status | sed 's/^/ /'; } say " build: $(build_id)$(tuning_on && echo ', GPU tuning on' || echo ', GPU tuning off')" say " coherent: $(coherent_state)" say " screen: $(resolution)" @@ -418,13 +418,13 @@ cmd_gui() { # screenshot / click / type / key / scroll / wait, through QMP in t case "$sub" in shot|wait) local out="${1:-$MACBOX_HOME/shots/screen.png}" tmp="$MACBOX_HOME/shots/.shot-$$.png" - if [ "$sub" = wait ]; then $DOCKER exec "${e[@]}" "$C" python3 "$REPO/lib/vmctl.py" wait "${2:-60}" "$tmp" - else $DOCKER exec "${e[@]}" "$C" python3 "$REPO/lib/vmctl.py" shot "$tmp"; fi + if [ "$sub" = wait ]; then $DOCKER exec "${e[@]}" "$C" python3 "$REPO/src/lib/vmctl.py" wait "${2:-60}" "$tmp" + else $DOCKER exec "${e[@]}" "$C" python3 "$REPO/src/lib/vmctl.py" shot "$tmp"; fi mv -f "$tmp" "$out"; say "$out" ;; type) - if [ "${1:-}" = - ]; then $DOCKER exec -i "${e[@]}" "$C" python3 "$REPO/lib/vmctl.py" type - - else $DOCKER exec "${e[@]}" "$C" python3 "$REPO/lib/vmctl.py" type "$@"; fi ;; - *) $DOCKER exec "${e[@]}" "$C" python3 "$REPO/lib/vmctl.py" "$sub" "$@" ;; + if [ "${1:-}" = - ]; then $DOCKER exec -i "${e[@]}" "$C" python3 "$REPO/src/lib/vmctl.py" type - + else $DOCKER exec "${e[@]}" "$C" python3 "$REPO/src/lib/vmctl.py" type "$@"; fi ;; + *) $DOCKER exec "${e[@]}" "$C" python3 "$REPO/src/lib/vmctl.py" "$sub" "$@" ;; esac } @@ -449,10 +449,10 @@ cmd_ssh_bootstrap() { # types into the desktop's Terminal: this host's key, the cmd_provision() { ssh_ok || die "ssh $MACBOX_SSH_HOST doesn't answer: macbox next" - [ -x "$REPO/guest/macbox-guest" ] || die "guest/macbox-guest is missing from this checkout" - say "== copying guest/ to ~/.macbox on the Mac" + [ -x "$REPO/src/guest/macbox-guest" ] || die "src/guest/macbox-guest is missing from this checkout" + say "== copying src/guest/ to ~/.macbox on the Mac" guest 'mkdir -p ~/.macbox' - tar -C "$REPO/guest" -cf - . | guest 'tar -C ~/.macbox -xf -' + tar -C "$REPO/src/guest" -cf - . | guest 'tar -C ~/.macbox -xf -' # The guest side's settings (macbox-guest reads ~/.macbox/config.env). printf 'MACBOX_SIM_PREFIX=%q\nMACBOX_POOL=%q\n' "$MACBOX_SIM_PREFIX" "$MACBOX_POOL" | guest 'cat > ~/.macbox/config.env' local subs=("$@"); [ ${#subs[@]} -gt 0 ] || subs=(base tools "stream-settings install") @@ -530,19 +530,19 @@ cmd_agents() { case "$sub" in install) mkdir -p "$bin" - for f in "$REPO"/sims/bin/* "$REPO"/skills/*/bin/*; do [ -f "$f" ] && ln -sfn "$f" "$bin/$(basename "$f")"; done + for f in "$REPO"/src/sims/bin/* "$REPO"/src/skills/*/bin/*; do [ -f "$f" ] && ln -sfn "$f" "$bin/$(basename "$f")"; done ln -sfn "$REPO/macbox" "$bin/macbox" for d in "$HOME/.claude/skills" "$HOME/.agents/skills"; do mkdir -p "$d" - for f in "$REPO"/skills/*/; do + for f in "$REPO"/src/skills/*/; do n=$(basename "$f") if [ -e "$d/$n" ] && [ ! -L "$d/$n" ]; then warn "$d/$n exists and isn't macbox's link; left as it is"; continue; fi ln -sfn "${f%/}" "$d/$n" done done - if [ -d "$REPO/sims/systemd" ] && command -v systemctl >/dev/null; then + if [ -d "$REPO/src/sims/systemd" ] && command -v systemctl >/dev/null; then mkdir -p "$HOME/.config/systemd/user" - for f in "$REPO"/sims/systemd/*; do ln -sfn "$f" "$HOME/.config/systemd/user/$(basename "$f")"; done + for f in "$REPO"/src/sims/systemd/*; do ln -sfn "$f" "$HOME/.config/systemd/user/$(basename "$f")"; done systemctl --user daemon-reload systemctl --user enable --now mac-sim-idle.timer >/dev/null 2>&1 || warn "couldn't enable mac-sim-idle.timer" fi @@ -550,7 +550,7 @@ cmd_agents() { for f in "$HOME/.claude/CLAUDE.md" "$HOME/.codex/AGENTS.md"; do [ -d "$(dirname "$f")" ] || continue [ -f "$f" ] && cp -p "$f" "$f.bak-macbox" - python3 - "$f" "$REPO/agents/simulators-snippet.md" <<'PY' + python3 - "$f" "$REPO/src/agents/simulators-snippet.md" <<'PY' import re, sys path, snip = sys.argv[1], open(sys.argv[2]).read().strip() + "\n" try: old = open(path).read() @@ -561,17 +561,17 @@ open(path, "w").write(new) PY say "instructions: the Simulators section in $f" done - say "linked: $(ls "$REPO/sims/bin" "$REPO"/skills/*/bin 2>/dev/null | grep -v -e : -e '^$' | tr '\n' ' ')macbox -> $bin" - say "skills: $(ls "$REPO/skills" | tr '\n' ' ')-> ~/.claude/skills, ~/.agents/skills" - say "Claude Code hook (optional): agents/README.md" ;; + say "linked: $(ls "$REPO/src/sims/bin" "$REPO"/src/skills/*/bin 2>/dev/null | grep -v -e : -e '^$' | tr '\n' ' ')macbox -> $bin" + say "skills: $(ls "$REPO/src/skills" | tr '\n' ' ')-> ~/.claude/skills, ~/.agents/skills" + say "Claude Code hook (optional): src/agents/README.md" ;; uninstall) - for f in "$REPO"/sims/bin/* "$REPO"/skills/*/bin/* "$REPO/macbox"; do n=$(basename "$f"); [ "$(readlink "$bin/$n" 2>/dev/null)" = "$f" ] && rm -f "$bin/$n"; done + for f in "$REPO"/src/sims/bin/* "$REPO"/src/skills/*/bin/* "$REPO/macbox"; do n=$(basename "$f"); [ "$(readlink "$bin/$n" 2>/dev/null)" = "$f" ] && rm -f "$bin/$n"; done for d in "$HOME/.claude/skills" "$HOME/.agents/skills"; do - for f in "$REPO"/skills/*/; do n=$(basename "$f"); [ "$(readlink "$d/$n" 2>/dev/null)" = "${f%/}" ] && rm -f "$d/$n"; done + for f in "$REPO"/src/skills/*/; do n=$(basename "$f"); [ "$(readlink "$d/$n" 2>/dev/null)" = "${f%/}" ] && rm -f "$d/$n"; done done - if [ -d "$REPO/sims/systemd" ] && command -v systemctl >/dev/null; then + if [ -d "$REPO/src/sims/systemd" ] && command -v systemctl >/dev/null; then systemctl --user disable --now mac-sim-idle.timer >/dev/null 2>&1 || true - for f in "$REPO"/sims/systemd/*; do n=$(basename "$f"); [ "$(readlink "$HOME/.config/systemd/user/$n" 2>/dev/null)" = "$f" ] && rm -f "$HOME/.config/systemd/user/$n"; done + for f in "$REPO"/src/sims/systemd/*; do n=$(basename "$f"); [ "$(readlink "$HOME/.config/systemd/user/$n" 2>/dev/null)" = "$f" ] && rm -f "$HOME/.config/systemd/user/$n"; done systemctl --user daemon-reload fi say "removed macbox's links" ;; @@ -624,7 +624,7 @@ Setup (docs/setup.md): macbox recovery-fix type the Metal error-mode line into Recovery's Terminal macbox boot-picker on|off OpenCore's boot picker (to reach Recovery) macbox ssh-bootstrap type the SSH key + Remote Login line into the desktop's Terminal - macbox provision [step...] copy guest/ to the Mac and run it (default: base tools stream-settings) + macbox provision [step...] copy src/guest/ to the Mac and run it (default: base tools stream-settings) macbox xcode install Xcode and the iOS Simulator runtime macbox disk nvme the system disk on NVMe (faster), once macOS is installed macbox pool [create|list|delete] the iOS Simulator pool @@ -665,7 +665,7 @@ case "$sub" in local|stream) echo "$1" >"$RUN/view"; if container_up; then cmd_down; cmd_up; fi ;; *) die "usage: macbox view [local|stream]" ;; esac ;; - stream) container_up || die "the container isn't running"; in_c "$REPO/container/stream-up.sh" "${1:-status}" ;; + stream) container_up || die "the container isn't running"; in_c "$REPO/src/container/stream-up.sh" "${1:-status}" ;; resolution) [[ "${1:-}" =~ ^[0-9]+x[0-9]+$ ]] || die "usage: macbox resolution WIDTHxHEIGHT" echo "$1" >"$RUN/resolution" diff --git a/site/pages/guides/expo-react-native-ios-on-linux.html b/site/pages/guides/expo-react-native-ios-on-linux.html deleted file mode 100644 index 3e737aa..0000000 --- a/site/pages/guides/expo-react-native-ios-on-linux.html +++ /dev/null @@ -1,76 +0,0 @@ -title: Build and Test Expo and React Native iOS Apps on Linux -short: Expo and React Native iOS on Linux -description: Build an Expo or React Native iOS app on Linux and run it in the real iOS Simulator, with Metro and Fast Refresh on Linux, Release builds and Expo Go. -kind: guide -order: 4 ---- -
-

Build and test Expo and React Native iOS apps on Linux

-

Expo and React Native let you write an iOS app on Linux, but building and running it needs Xcode, which needs macOS. With macbox, one command copies your checkout into a macOS VM on the same machine, builds it there with Xcode and CocoaPods, and opens it in a real iOS Simulator, while Metro keeps running on Linux.

-{{meta}} -
-

In short

-
    -
  • mac-sim up && mac-sim run from the app's checkout: a Debug build in the simulator, with Fast Refresh from Linux.
  • -
  • MODE=release mac-sim run for a Release build; MODE=go mac-sim run for Expo Go.
  • -
  • The first build takes 2 to 15 minutes; later ones are incremental.
  • -
-
- -

Before you start

-
    -
  • A macbox VM with Xcode and the simulator pool, and the agent tools installed: macOS on Linux, Xcode on Linux, then ./macbox pool and ./macbox agents install.
  • -
  • The app's dependencies installed on Linux too (npm install, bun install, …), because Metro runs there.
  • -
- -

Run the app

-
cd ~/code/my-app
-mac-sim up                    # claim a simulator for this checkout and boot it
-mac-sim run                   # build on the Mac, install, open; Metro runs here
-mac-sim shot /tmp/home.png    # look at it
-

What mac-sim run does:

-
    -
  1. Copies the checkout to the Mac, without node_modules, .git and generated ios/ and android/ folders. Uncommitted changes are included; nothing needs to be pushed. A gitignored .env is copied too.
  2. -
  3. Installs dependencies there with the project's package manager, and runs expo prebuild and pod install when the app config or dependencies changed.
  4. -
  5. Builds with xcodebuild for that simulator (x86_64, since the VM is an Intel Mac), installs and opens the app.
  6. -
  7. Starts Metro on Linux from your checkout. The app reaches it through an SSH tunnel, so saving a file updates the app by Fast Refresh.
  8. -
-

Run mac-sim run again after native changes: a new native dependency, a config plugin, app.json.

- -

Release builds and Expo Go

-
- - - - - - -
CommandWhat you get
mac-sim runa Debug build with Metro on Linux and Fast Refresh
MODE=release mac-sim runa Release build with the JavaScript inside and no Metro: what users get. Check performance here; Debug builds and Expo Go add jank of their own
MODE=go mac-sim runthe app in Expo Go, at the version matching the project's SDK, installed for you. Only for apps without custom native code
- -

Other project shapes

-
    -
  • Bare React Native with its own ios/ folder in git: built as it is, with pod install but no prebuild.
  • -
  • Monorepos with several apps: run from inside the app's folder, or set APP_DIR.
  • -
  • Old libraries that import React Native's old headers ('RCTBridge.h' file not found): RN_FROM_SOURCE=1 mac-sim run builds React Native from source, slower.
  • -
  • Don't run npx expo run:ios on the Mac: it opens Simulator.app, which doubles the GPU's work for every simulator.
  • -
- -

Check the UI, not just the build

-
mac-sim snapshot               # the accessibility tree, refs like @e4
-mac-sim ad press @e4           # tap; also fill, scroll, swipe, back...
-mac-sim open myapp://settings  # a deep link
-mac-sim record /tmp/flow.mp4 10 &
-mac-sim ad press @e4           # drive the flow while it records
-wait; sim-fps /tmp/flow.mp4    # 60 fps and no dropped frames in every stretch?
-

Measure motion on the default 1x simulator; the 3x ones (mac-sim up --sharp) are for screenshots at a real iPhone's pixels. Need widgets, Live Activities, the Dynamic Island or push? mac-sim up --full. mac-sim logs shows the build, Metro and tunnel output when something fails.

- -

Android from the same checkout

-

android-sim up && android-sim run does the same with an Android emulator on the host, if the Android SDK is set up (docs/agents.md).

- -

Real phones and TestFlight

-

phone-build (the phone-builds skill) makes an .ipa for an iPhone or TestFlight with your eas.json profiles. It uses Expo's free monthly EAS cloud builds first, then builds locally: iOS in the macbox VM, Android on the host. Signing for a device needs Apple's paid Developer Program. See skills/phone-builds.

- -

When you're done

-
mac-sim down    # stop Metro and free the simulator
-mac-sim clean   # optional: delete this checkout's copy and build on the Mac (1 to 2 GB)
-
diff --git a/site/pages/guides/gpu-accelerated-macos-vm-on-linux.html b/site/pages/guides/gpu-accelerated-macos-vm-on-linux.html deleted file mode 100644 index 43b4887..0000000 --- a/site/pages/guides/gpu-accelerated-macos-vm-on-linux.html +++ /dev/null @@ -1,78 +0,0 @@ -title: GPU-Accelerated macOS VM on Linux, Without GPU Passthrough -short: GPU-accelerated macOS VM -description: How macbox gives a macOS VM on Linux Metal acceleration on the host's own Intel or AMD GPU, with Reims vGPU and metal2vulkan instead of VFIO passthrough. -kind: guide -order: 6 ---- -
-

A GPU-accelerated macOS VM on Linux, without GPU passthrough

-

macOS in QEMU usually means software rendering, unless you give the VM a whole GPU it has drivers for. macbox takes a different path: Apple's own paravirtual GPU device, answered on the host by Reims vGPU and translated from Metal to Vulkan. The host keeps its GPU, macOS gets Metal, and an integrated GPU is enough.

-{{meta}} -
-

In short

-
    -
  • No VFIO, no second GPU, no guest driver: macOS's built-in driver talks to the paravirtual device.
  • -
  • Works with a Mesa Vulkan driver: Intel (measured on Arrow Lake) or AMD (supported by Reims, untested with macbox).
  • -
  • macbox's patches took a 3x iOS Simulator from 17 to 117 fps on the measured GPU.
  • -
-
- -

Why macOS VMs are usually slow

-

macOS draws its desktop, its apps and the iOS Simulator with Metal. In a QEMU VM with an emulated display adapter there is no Metal device, so everything falls back to software rendering. The common fix is VFIO passthrough: give the VM a physical GPU that macOS has drivers for. That takes the GPU away from the host, needs a card macOS has a driver for (recent NVIDIA cards have none), rarely works with an integrated GPU, and is fiddly to set up.

- -

The path macbox uses

-
macOS 26 (guest): Metal ──► Apple's paravirtual GPU driver (built in)
-   │  apple-gfx-pci device in QEMU
-   ▼
-Reims vGPU (host) ──► metal2vulkan ──► Vulkan (Mesa: ANV for Intel, RADV for AMD) ──► your GPU
-
    -
  • Reims vGPU implements, on the host, the device Apple uses for its own virtual machines (apple-gfx-pci). macOS ships a driver for it, so the guest needs nothing installed.
  • -
  • metal2vulkan executes the Metal command streams that arrive at that device on Vulkan.
  • -
  • The display: Reims draws each guest display into its own window. macbox puts it in a headless compositor and streams it with Selkies (H.264 on the GPU), or opens it directly on your Wayland desktop. QEMU's VNC is never used: it reads every frame back from the GPU and manages 2 to 3 frames a second.
  • -
-

Reims vGPU, metal2vulkan, reims-util and their QEMU fork are the work of Anees Iqbal (steelbrain). macbox builds them from pinned commits, applies its patches, and runs them in a container.

- -

What macbox's patches change

-

On every GPU measured so far the GPU is the bottleneck, so what matters is how much extra work translation adds per frame. Before the patches, most of it was copies: macOS's framebuffer and the simulator's display surface live in guest RAM, and metal2vulkan copied each into a GPU image and back around every render pass. Those shadow copies were 51% of all GPU time with the simulator and 67% with the desktop. The patch series renders those textures in place, counts flat compute grids in 32 bits, adds Arrow Lake-specific device facts and a file of live switches for experiments, and Coherent: QEMU traps the guest CPU's first touch of a surface's page, so the GPU's image can stay ahead of guest RAM and only the touched pages are synced. On top of it, batches complete in groups, a new texture's pages are staged with one copy instead of a mapping per page run, and submission checks run in the scheduler's own pass. Details: patches/README.md.

- -

Results

-

Intel Core Ultra 7 265 (Arrow Lake iGPU), Mesa 26.2.4, macOS 26.7.1, iOS 26.5, 8 vCPUs and 12 GB. GlassBench is a table scrolling under Liquid Glass bars and a floating glass toolbar; frames counted at the simulator's screen, two runs each.

-
- - - - - - - - -
WorkloadReims 2ce3209Reims 7198fe6macbox, Oct 28macbox, Nov 5, Coherent onmacbox now
Simulator 1x (402×874)53.557.095.8 / 92.5n/mn/m
Simulator 2x (804×1748)33.537.667.8 / 60.5n/mn/m
Simulator 3x (1206×2622)17.219.238.5 / 39.570.0117
Three 3x simulators at once, eachn/m31–32
Safari at 3x, blurred floating barn/a39.566.4 / 64.2n/mn/m
-

Frames per second; n/m: not measured on that build. The Nov 5 column is the cohwl A/B (2026-11-05); "now" is the build macbox makes since 2026-11-09, from its soak and A/B runs. A 3x frame now takes about 7.7 ms of GPU time: ~4.7 ms is the simulator's own rendering, the rest is what translation still adds (copies for draws that read their own pass, barriers between command buffers). A Genie minimize on a 3440×1440 desktop went from about 12 to 19.5 frames per animation on the Oct 28 build, and 30 with Coherent. Coherent is on by default with an Arrow Lake iGPU (MACBOX_COHERENT=off turns it off), behind a crash guard; one rare GPU hang under repeated boots of three simulators is still open. Measure your own GPU with the tools in bench/.

- -

Which GPUs

-
- - - - - - -
GPUStatus
Intel (Mesa ANV)measured: an Arrow Lake iGPU. The Arrow Lake facts are set only on Arrow Lake PCI ids; other Intel GPUs use in-place rendering where its per-memory-kind check passes
AMD (Mesa RADV)supported by Reims, untested with macbox. Needs /dev/udmabuf
NVIDIAworks with Reims, but macbox's image doesn't ship NVIDIA's driver yet
- -

Settings that matter

-
    -
  • Simulator scale. 1x simulators are 4 to 9 times cheaper than 3x. macbox's pool is mostly 1x.
  • -
  • Desktop resolution and refresh. 1920×1080 costs about half of 3440×1440; MACBOX_REFRESH=60 keeps macOS from asking for 100 or 120 Hz.
  • -
  • Simulator.app closed. It doubles the GPU's work.
  • -
  • CPU pinning on hybrid CPUs (MACBOX_CPUSET), and the VM's disk on NVMe (./macbox disk nvme).
  • -
  • MACBOX_GPU_TUNING=off turns macbox's runtime GPU tuning off; ./macbox build --upstream builds Reims as upstream ships it, for comparison.
  • -
- -

Known limits

-
    -
  • Animations start about 0.1 s late on an idle display: macOS's driver for this device sends no vblank while nothing presents (reims-vgpu#141).
  • -
  • The GPU is shared: one 3x simulator reaches about 117 fps on this iGPU; two or three share about 105 frames a second.
  • -
  • Tried without gain: answering as an Intel or AMD Mac GPU, compressed heap textures, newer Mesa, hugepages (impossible: Reims maps guest RAM in 16 KiB views). The full list is in docs/performance.md.
  • -
-

To set it up, follow How to run macOS on Linux.

-
diff --git a/site/pages/guides/index.html b/site/pages/guides/index.html deleted file mode 100644 index 5d21624..0000000 --- a/site/pages/guides/index.html +++ /dev/null @@ -1,10 +0,0 @@ -title: Guides: macOS, Xcode and the iOS Simulator on Linux -short: Guides -description: Technical guides for macbox: run macOS, Xcode and the iOS Simulator on Linux with GPU acceleration, for Expo apps and AI coding agents. ---- -
- -

Guides

-

Each guide answers one question, with the commands macbox actually ships. The step-by-step reference stays in the repository's docs; these pages link to it where it goes deeper.

-{{guides}} -
diff --git a/site/pages/guides/ios-simulator-for-ai-coding-agents.html b/site/pages/guides/ios-simulator-for-ai-coding-agents.html deleted file mode 100644 index 5acbd1b..0000000 --- a/site/pages/guides/ios-simulator-for-ai-coding-agents.html +++ /dev/null @@ -1,75 +0,0 @@ -title: iOS Simulators for AI Coding Agents and T3 Code -short: iOS Simulators for AI agents -description: Give Claude Code, Codex and T3 Code agents their own iOS Simulator on a Linux host: macbox's officially supported tools, skill and T3 Code Device panel. -kind: guide -order: 5 ---- -
-

Running iOS Simulators with AI coding agents

-

An agent that changes an iOS screen should see it running, not guess from the code. macbox officially supports AI coding agents (Claude Code and Codex) and T3 Code: it gives every agent checkout its own iOS Simulator on your Linux machine, the commands to build, tap, screenshot and record it, a 60 fps check, and a skill that tells the agent when to use them.

-{{meta}} -
-

In short

-
    -
  • ./macbox agents install installs mac-sim, sim-fps, android-sim, and the simulators skill for Claude Code and Codex.
  • -
  • ./macbox t3 register and ./macbox t3 fix-hub put the simulators in T3 Code's Device panel, streamed live.
  • -
  • Each checkout gets its own simulator, so agents in parallel worktrees don't wait for each other.
  • -
-
- -

What's supported

-

These integrations are part of macbox and maintained in its repository. "Supported" here means macbox's own support; macbox isn't affiliated with or endorsed by Anthropic, OpenAI or T3.

-
- - - - - - - -
ToolWhat macbox gives it
Claude Codethe simulators, phone-builds and macbox skills in ~/.claude/skills; a "Simulators" section in ~/.claude/CLAUDE.md; an optional hook that reminds it of the skill when a prompt mentions a simulator
Codexthe same skills in ~/.agents/skills, and the same section in ~/.codex/AGENTS.md
T3 Codethe VM as a device host in the Device panel (macbox t3 register), T3's device hub rebuilt for the Intel VM (macbox t3 fix-hub), and mac-sim t3 to print the ids for device_open
Any agent with a shellmac-sim, sim-fps and android-sim are plain commands; the skill files are Markdown any agent can read
- -

Install

-

With a working macbox VM, Xcode and the pool (iOS Simulator on Linux):

-
./macbox agents install
-

It links mac-sim, mac-sim-remote, sim-fps, android-sim, android-gpu-desktop, phone-build and macbox into ~/.local/bin; links the skills into ~/.claude/skills and ~/.agents/skills; writes the simulators section between <!-- macbox:simulators --> markers in ~/.claude/CLAUDE.md and ~/.codex/AGENTS.md (each backed up first); and enables the timer that shuts idle simulators down. ./macbox agents uninstall removes the links and the timer.

- -

What an agent does with it

-

From the app's checkout:

-
mac-sim up                     # claim a simulator from the pool and boot it
-mac-sim run                    # copy the checkout to the Mac, build, install, open; Metro on Linux
-mac-sim snapshot               # the screen as an accessibility tree, refs like @e12
-mac-sim ad press @e12          # tap (any agent-device command)
-mac-sim shot /tmp/a.png        # a lossless screenshot to look at
-mac-sim record /tmp/a.mp4 10 & # record while driving the flow...
-wait; sim-fps /tmp/a.mp4       # ...then: 60 fps in every stretch of motion? dropped frames?
-mac-sim down                   # give it back
-

The simulators skill is the agent's rulebook. After every UI change it runs the app, screenshots and looks, records the whole flow, and checks with sim-fps that motion held 60 fps with no dropped frames. It re-checks on a Release build (MODE=release mac-sim run) before calling the work done. sim-fps exits non-zero when a stretch drops frames, so the check is a pass or a fail, not an impression.

-

Measure motion on a 1x simulator (the default). On a modest GPU, 3x simulators can't reach 60 fps in heavy scenes, and that's the machine, not the app. On an Intel Arrow Lake iGPU a 1x simulator reached 92 to 96 fps in a heavy Liquid Glass benchmark.

- -

Several agents at once

-

mac-sim keys each simulator to a checkout's git root. Two agents in two worktrees get two simulators, and mac-sim status shows who holds what. The default pool has two slim simulators plus full, sharp and small. Simulators nobody has used for 20 minutes shut down on their own.

- -

T3 Code's Device panel

-

T3 Code shows simulators and emulators in its Device panel, and its agents can call device_open, device_screenshot and device_list. iOS needs a Mac, which T3 reaches over SSH; macbox's VM is that Mac.

-
./macbox t3 register   # add the VM to T3's deviceHosts (settings backed up first)
-                       # open T3's Device panel once: T3 installs its device hub on the Mac
-./macbox t3 fix-hub    # rebuild the hub's native parts for the Intel VM
-./macbox t3 status
-

T3's hub ships its native parts for Apple silicon only; fix-hub rebuilds them for x86-64 from the hub's own source, including a fix that makes the VM's software H.264 encoder deliver each frame at once. Run it again after T3 updates its hub. Then:

-
    -
  • mac-sim t3 prints hostId=macbox deviceId=<udid>; the agent passes them to device_open, and the user watches every tap live.
  • -
  • On iOS the agent keeps driving with mac-sim ad …. Using the agent-device command device_open returns as well would start a second session on the same simulator, and the two refuse each other (DEVICE_IN_USE).
  • -
  • From a tap to the first new frame on the stream: a median of 66 ms inside the Mac.
  • -
  • Android emulators started with android-sim show up in the panel by themselves (hostId local, the serial from android-sim serial).
  • -
- -

Letting an agent set up macbox itself

-

An agent can do the whole installation, including the steps inside macOS's GUI. It looks at the VM's screen with ./macbox screenshot and acts with click, type, key and wait. Point it at AGENTS.md: it lists the sequence and the ground rules, such as asking before changing the host and never handling the user's passwords or Apple Account.

- -

Android and real phones

-
    -
  • android-sim has the same shape for Android emulators on the host: up, run, snapshot, ad, shot, record, down. It needs the Android SDK; see docs/agents.md.
  • -
  • The phone-builds skill and phone-build make an .ipa, a TestFlight upload or an .apk: Expo's free EAS cloud builds first, then locally (iOS in the VM). Device signing needs Apple's paid Developer Program.
  • -
-
diff --git a/site/pages/guides/ios-simulator-on-linux.html b/site/pages/guides/ios-simulator-on-linux.html deleted file mode 100644 index 3e6388d..0000000 --- a/site/pages/guides/ios-simulator-on-linux.html +++ /dev/null @@ -1,79 +0,0 @@ -title: iOS Simulator on Linux: Run the Real Simulator Locally -short: iOS Simulator on Linux -description: Run Apple's real iOS 26 Simulator on a Linux host, GPU-accelerated, with no Mac or cloud service: a simulator pool, mac-sim commands and frame rates. -kind: guide -order: 3 ---- -
-

iOS Simulator on Linux

-

The iOS Simulator is part of Xcode, and Xcode needs macOS, so there is no native Linux version. Web-based "iOS emulators" only imitate the look. To run the real Simulator with your own app on a Linux machine, run macOS in a VM with the GPU attached, and the Simulator inside it. macbox does that, and gives you a command, mac-sim, to drive it from Linux.

-{{meta}} -
-

In short

-
    -
  • macbox runs macOS 26 with Xcode on your Linux host; the Simulator draws with Metal on your GPU.
  • -
  • ./macbox pool makes five simulators tuned for the VM; mac-sim up claims one per checkout.
  • -
  • On an Intel Arrow Lake iGPU, a 1x simulator renders a heavy Liquid Glass scene at 92 to 96 fps.
  • -
-
- -

Set it up

-

You need a macbox VM with Xcode (macOS on Linux, then Xcode on Linux). Then, on the host:

-
./macbox pool             # create the simulator pool in macOS
-./macbox agents install   # mac-sim, sim-fps, android-sim in ~/.local/bin, the idle timer
- -

The pool

-

Instead of many default simulators, macbox keeps a small pool built for a VM. Each one is named <iPhone> (macbox <kind>), for example iPhone 17 Pro (macbox slim 1).

-
- - - - - - - -
KindPixelsUse it for
slim-1, slim-21xmost work. About 170 background iOS services are off (about 0.6 GB of memory instead of about 2), and it animates fastest
full1xwidgets, Live Activities, the Dynamic Island, push notifications: every iOS service runs
sharp3xscreenshots at a real iPhone's pixels
small3xsmall-phone layouts (the "e" iPhone)
-

The 1x simulators have the same layout in points as a real iPhone with a quarter of 2x's pixels, which is why they are the default. Use the 3x ones for stills, not for judging frame rates.

- -

Use it

-

Run mac-sim from inside an app's checkout. Each checkout (git root) gets its own simulator and keeps it until down, so parallel worktrees don't wait for each other.

-
mac-sim up                  # claim a slim simulator and boot it (--full, --sharp, --small)
-mac-sim run                 # build the app on the Mac, install and open it; Metro runs here
-mac-sim snapshot            # the screen as an accessibility tree, refs like @e12
-mac-sim ad press @e12       # tap; any agent-device command
-mac-sim open myapp://path   # a deep link
-mac-sim shot /tmp/home.png  # a lossless screenshot, copied to Linux
-mac-sim record /tmp/a.mp4 10   # 10 s of video
-sim-fps /tmp/a.mp4          # fps and dropped frames per stretch of motion
-mac-sim status              # every simulator and who holds it
-mac-sim down                # give it back
-

mac-sim install path/To.app installs any simulator build, and mac-sim mac '<command>' runs a shell command on the Mac with $UDID set to your simulator, so plain xcrun simctl works too.

- -

See the screen

-
    -
  • Screenshots and recordings from mac-sim shot and record arrive on Linux, at the simulator's own pixels.
  • -
  • T3 Code's Device panel streams the simulator live and takes taps: ./macbox t3 register, then ./macbox t3 fix-hub. docs/t3-code.md has the details.
  • -
  • The macOS desktop in a browser tab (http://127.0.0.1:6081/) or a local window, if you want Simulator.app. Keep it closed otherwise: it opens a window per simulator and doubles the GPU's work.
  • -
- -

How fast it is

-

Measured with GlassBench, a table scrolling under Liquid Glass bars and a floating glass toolbar, counted at the simulator's own screen, on an Intel Core Ultra 7 265 (Arrow Lake iGPU) with Mesa 26.2.4, macOS 26.7.1 and iOS 26.5:

-
- - - - - - -
SimulatorReims upstream (2ce3209)macbox build
1x (402×874)53.5 fps95.8 / 92.5 fps
2x (804×1748)33.5 fps67.8 / 60.5 fps
3x (1206×2622)17.2 fps117 fps (31–32 each with three at once)
-

1x and 2x are from the October 28 build; 3x is the current one. The GPU sets the ceiling: a 3x simulator takes about 7.7 ms of that iGPU per frame and comes close to the iPhone 17 Pro's 120 Hz screen; simulators animating at the same time share about 105 frames a second. Recording uses the VM's software H.264 encoder, about 50 fps with one simulator animating. Full method: docs/performance.md.

- -

Limits

-
    -
  • iOS 26 Simulators are the newest on x86-64; iOS 27's simulators are Apple silicon only.
  • -
  • Simulator resolutions are fixed once created; pick a different pool simulator instead.
  • -
  • Don't restart CoreSimulatorService while simulators run: it shuts down every one of them.
  • -
  • Pool simulators idle for 20 minutes (no mac-sim command, no viewer) are shut down by a timer.
  • -
-

Next: build an Expo or React Native app, or hand the simulator to an AI coding agent.

-
diff --git a/site/pages/guides/macbox-vs-docker-osx-and-osx-kvm.html b/site/pages/guides/macbox-vs-docker-osx-and-osx-kvm.html deleted file mode 100644 index 981218c..0000000 --- a/site/pages/guides/macbox-vs-docker-osx-and-osx-kvm.html +++ /dev/null @@ -1,52 +0,0 @@ -title: macbox vs Docker-OSX and OSX-KVM: macOS on Linux with GPU -short: macbox vs Docker-OSX and OSX-KVM -description: How macbox compares with Docker-OSX, OSX-KVM, cloud simulators and a real Mac for running macOS, Xcode and the iOS Simulator on Linux, GPU included. -kind: guide -order: 7 ---- -
-

macbox vs Docker-OSX and OSX-KVM

-

Docker-OSX and OSX-KVM are the well-known ways to run macOS on Linux, and macbox stands on the same foundation: QEMU, KVM and OpenCore. The difference is the GPU, and what the VM is for. macbox gives macOS Metal on the host's own GPU without passthrough, and it is built around Xcode, the iOS Simulator and AI coding agents.

-{{meta}} -
-

In short

-
    -
  • Pick macbox to develop and test iOS apps on a Linux machine, with Metal on an Intel or AMD GPU you keep using on the host, and with agent tooling.
  • -
  • Pick Docker-OSX or OSX-KVM for a range of macOS versions, a GPU you can pass through, or a general-purpose macOS VM.
  • -
  • Pick a Mac or a cloud service for the newest Xcode and iOS, or where Apple's license must be met.
  • -
-
- -

Side by side

-
- - - - - - - - - - - - -
macboxDocker-OSX, OSX-KVMCloud simulatorsA Mac, or a remote Mac
Runs onyour Linux hostyour Linux hostthe provider's Macsa Mac
Metal in macOSyes, on the host's GPU through Vulkanonly with a GPU passed through to the VMyesyes
The host keeps its GPUyesnot with passthroughn/an/a
macOS versionsmacOS 26 Tahoea range of releasesthe provider'sthe Mac's
Newest iOS Simulator26.x, the x86-64 ceiling26.xthe newestthe newest
Xcode and simulators set up for youyes: macbox xcode, macbox poolby handyesby hand
Built for agentsa simulator per checkout, screenshots, recordings, a 60 fps check, a skill, T3 Code's Device panelnovarieswith tools such as agent-device
Costyour hardwareyour hardwareusually per minute or a planthe Mac
Apple's macOS licensenot on non-Apple hardwarenot on non-Apple hardwareyesyes
- -

The GPU difference

-

Docker-OSX and OSX-KVM give macOS an emulated display adapter. macOS has no Metal driver for it, so the desktop, Xcode and the iOS Simulator draw in software, unless you pass a physical GPU through with VFIO. Passthrough needs a card macOS has drivers for, and that card then belongs to the VM, not the host.

-

macbox gives QEMU Apple's paravirtual GPU device through Reims vGPU. macOS's built-in driver talks to it, and metal2vulkan runs the Metal work on the host's Vulkan driver. On an Intel Arrow Lake iGPU, that is enough for a 1x iOS Simulator to render a heavy Liquid Glass scene at 92 to 96 fps. How it works, with measurements.

- -

The scope difference

-

Docker-OSX and OSX-KVM aim to boot macOS, across many versions, for whatever you need it for. macbox does less and goes further along one path: macOS 26, then Xcode, a pool of simulators tuned for a VM (mostly 1x, with background services trimmed), Metro on Linux for Expo and React Native, T3 Code's Device panel, and mac-sim and sim-fps for agents. One CLI, macbox, runs it, and macbox next always says what's left to do.

- -

When macbox isn't the right tool

-
    -
  • You need Xcode 27, iOS 27 Simulators or anything newer: Apple ships those for Apple silicon only. Use a Mac or a cloud service.
  • -
  • You need an older macOS release, or a GPU passed through for other reasons: Docker-OSX or OSX-KVM.
  • -
  • Your host has only an NVIDIA GPU: macbox's image doesn't ship NVIDIA's driver yet.
  • -
  • You need to stay within Apple's macOS license: it allows macOS only on Apple-branded hardware.
  • -
  • Commercial use: macbox's own code is under the PolyForm Noncommercial License, so commercial use needs the author's permission.
  • -
-

Ready to try it? How to run macOS on Linux with macbox.

-
diff --git a/site/pages/guides/run-macos-on-linux.html b/site/pages/guides/run-macos-on-linux.html deleted file mode 100644 index d448804..0000000 --- a/site/pages/guides/run-macos-on-linux.html +++ /dev/null @@ -1,92 +0,0 @@ -title: How to Run macOS on Linux with GPU Acceleration -short: Run macOS on Linux -description: Run macOS 26 Tahoe in a VM on a Linux host with KVM, QEMU and Metal on your own GPU, step by step with macbox: requirements, install, daily use. -kind: guide -order: 1 ---- -
-

How to run macOS on Linux with GPU acceleration

-

macOS runs well in a KVM virtual machine on Linux. The usual catch is graphics: without a GPU passed through to the VM, macOS draws in software, and anything built on Metal is slow or broken. macbox solves that with Reims vGPU, and wraps the whole setup in one command-line tool.

-{{meta}} -
-

In short

-
    -
  • You need an x86-64 Linux host with KVM, AVX2, an Intel or AMD GPU with a Mesa Vulkan driver, 16 GB of RAM, about 150 GB of SSD, and Docker.
  • -
  • ./macbox init, doctor, build, create, up, then a short install in the VM's screen. ./macbox next always prints the next step.
  • -
  • The result is macOS 26 Tahoe with Metal on your GPU, reachable as ssh macbox and as a window or browser tab.
  • -
-
- -

How it works

-

macbox runs QEMU inside a Docker container, with KVM for the CPU. Booting macOS on a PC goes through OpenCore, which reims-ctl sets up. The part that is different from other macOS-on-Linux setups is the GPU:

-
    -
  • Reims vGPU gives QEMU Apple's paravirtual GPU device (apple-gfx-pci). macOS already has a driver for it, so no guest driver is needed.
  • -
  • metal2vulkan runs the Metal work that device receives on Vulkan, through Mesa on your GPU.
  • -
  • The host keeps its GPU. Nothing is passed through, and an integrated GPU is enough.
  • -
-

macbox builds both from pinned commits with its own patches, which took a 3x iOS Simulator from 17 to 117 fps on the GPU they were measured on. The GPU guide explains the path in detail.

- -

Requirements

-
- - - - - - - -
CPUx86-64 with VT-x or AMD-V, and AVX2
GPUIntel (measured: Arrow Lake iGPU) or AMD (supported by Reims, untested here), with a Mesa Vulkan driver. macbox's image doesn't ship NVIDIA's driver yet
RAM16 GB or more; the VM takes 8 to 16
Diskabout 150 GB free on an SSD or NVMe
SoftwareKVM (/dev/kvm), a render node (/dev/dri/renderD*), Docker (rootless works well) or Podman (untested)
-

The guest is macOS 26 Tahoe. Apple's last macOS for Intel is 26, so that is also the newest macOS that runs on x86-64.

-

Apple's software license agreement for macOS allows it to run only on Apple-branded hardware. Running it in a VM on other hardware breaches that agreement. macbox ships no Apple software; macOS downloads from Apple, and complying with Apple's terms is up to you.

- -

1. Prepare the host

-

Your user needs to open /dev/kvm and the GPU's render node, and Reims needs a much higher vm.max_map_count than the default 65530:

-
sudo usermod -aG kvm,render $USER        # then log in again
-echo vm.max_map_count=2097152 | sudo tee /etc/sysctl.d/60-macbox.conf && sudo sysctl --system
-

With more than one GPU, choose the render node in the config (MACBOX_RENDER_NODE). An AMD GPU also needs access to /dev/udmabuf.

- -

2. Configure, check and build

-
git clone https://github.com/TUNA-NOPE/macbox ~/macbox && cd ~/macbox
-./macbox init      # ~/.config/macbox/macbox.env, an SSH key, a "Host macbox" alias
-./macbox doctor    # fix every FAIL; WARN lines are advice
-./macbox build     # the image, then Reims vGPU + metal2vulkan + QEMU: 20 to 60 minutes, ~25 GB
-

init sizes the VM for your machine (half the cores, a third of the RAM, within limits). Look at ~/.config/macbox/macbox.env before you build: the resolution, CPU pinning for hybrid CPUs, and where everything is stored (MACBOX_HOME) are all set there.

- -

3. Create the VM and install macOS

-
./macbox create          # the newest macOS 26 Tahoe, through Apple's recovery image
-./macbox boot-picker on  # OpenCore's boot menu, needed for one Recovery step
-./macbox up
-

Open the screen at http://127.0.0.1:6081/ in a browser on the host, or run ./macbox view local from a Wayland desktop on the host for a window with no encoding at all. Then, in the VM:

-
    -
  1. In Recovery, open Disk Utility, choose View › Show All Devices, and erase QEMU HARDDISK Media as APFS with a GUID partition map.
  2. -
  3. Choose Reinstall macOS and install onto that disk. It downloads macOS from Apple and restarts a few times (30 to 60 minutes).
  4. -
  5. When Setup Assistant or a broken desktop appears, restart the VM (./macbox down && ./macbox up), choose Recovery in OpenCore's menu, open Utilities › Terminal, and run ./macbox recovery-fix on the host. It sets the Metal error mode macOS 26 needs under Reims.
  6. -
  7. Go through Setup Assistant: skip the Apple Account and create an administrator named dev.
  8. -
  9. Open Terminal in macOS and run ./macbox ssh-bootstrap on the host. Then ssh macbox sw_vers should answer.
  10. -
-

Each of these steps is spelled out, with what to do when one goes wrong, in docs/setup.md. An AI agent can do them too: it sees the screen with ./macbox screenshot and acts with click, type and key (AGENTS.md).

- -

4. Finish over SSH

-
./macbox down && ./macbox disk nvme && ./macbox boot-picker off && ./macbox up
-./macbox provision                            # passwordless sudo, no sleep, Node, Ruby + CocoaPods
-./macbox xcode ~/Downloads/Xcode_26.6.xip     # optional: Xcode and the iOS Simulator runtime
-./macbox pool                                 # optional: the iOS Simulator pool
-./macbox agents install                       # optional: mac-sim, sim-fps and the skills
-

Moving the system disk to NVMe makes small reads about a third faster and app launches up to twice as fast. ./macbox next ticks off each step as it's done.

- -

Day to day

-
./macbox up | down | status
-./macbox ssh                       # a shell on the Mac
-./macbox logs qemu                 # or selkies, sway
-./macbox resolution 2560x1440      # macOS's screen size (restarts a running VM)
-./macbox backup before-update      # a copy of the disk, with the VM stopped
-

To watch from another machine, forward the port (ssh -L 6081:127.0.0.1:6081 <host>) or publish it on a private tailnet. The stream has no password of its own, so never expose it on the open internet.

- -

Limits

-
    -
  • macOS 26 is the ceiling on x86-64; macOS 27 and iOS 27's simulators are Apple silicon only.
  • -
  • NVIDIA GPUs aren't supported by macbox's image yet. AMD should work through Reims, but hasn't been tested with macbox.
  • -
  • An idle macOS display gets no vblank from its driver, so the first frame of an animation starts about 0.1 s late (reims-vgpu#141).
  • -
-

When something doesn't work, start with ./macbox doctor and docs/troubleshooting.md.

-
diff --git a/site/pages/guides/xcode-on-linux.html b/site/pages/guides/xcode-on-linux.html deleted file mode 100644 index 0c24b6d..0000000 --- a/site/pages/guides/xcode-on-linux.html +++ /dev/null @@ -1,65 +0,0 @@ -title: How to Run Xcode on Linux -short: Xcode on Linux -description: Xcode needs macOS, but you can run the real Xcode 26 on a Linux machine inside a GPU-accelerated macOS VM. Install it, build with xcodebuild over SSH. -kind: guide -order: 2 ---- -
-

How to run Xcode on Linux

-

There is no Xcode for Linux, and no Linux tool that replaces it for iOS: building, signing and simulating Apple apps needs Apple's SDKs, which run on macOS. What you can do is run macOS itself on your Linux machine, and the real Xcode inside it. This guide does that with macbox.

-{{meta}} -
-

In short

-
    -
  • Set up a macOS VM with macbox (guide).
  • -
  • Download Xcode 26's .xip from Apple, then ./macbox xcode ~/Downloads/Xcode_26.6.xip.
  • -
  • Build from Linux with ssh macbox xcodebuild …, or use Xcode's window in the VM's screen.
  • -
-
- -

Your options

-
- - - - - - -
OptionXcode versionTrade-off
A Mac, or a rented remote Macthe newestthe supported route; costs the Mac or a monthly fee
A cloud CI or simulator servicethe newestbilled per minute or by plan; your code and builds leave your machine
A macOS VM on Linux (macbox)Xcode 26your own hardware, GPU-accelerated; macOS 26 is the x86-64 ceiling; outside Apple's license on non-Apple hardware
-

Cross-compiling Swift on Linux works for server-side Swift and command-line tools, but it doesn't give you UIKit, SwiftUI, the iOS SDK, Interface Builder or the Simulator.

- -

Which Xcode runs

-

Xcode 26, with iOS 26 Simulators. macbox's macOS guest is x86-64, and macOS 26 Tahoe is the last macOS for Intel. Apple ships macOS 27, Xcode 27 and iOS 27's simulators for Apple silicon only, so they can't run on an x86-64 Linux host. macbox is used day to day with Xcode 26.6 and iOS 26.5.

- -

Install Xcode

-
    -
  1. Set up the VM as in How to run macOS on Linux, through ./macbox provision. You need ssh macbox working.
  2. -
  3. Download Xcode's .xip from developer.apple.com/download/all. Any free Apple Account can sign in there. macbox never handles your Apple ID, so this one step is yours, on the host.
  4. -
  5. Install it: -
    ./macbox xcode ~/Downloads/Xcode_26.6.xip
    -./macbox xcode     # afterwards: the version, license and first-launch status
    -It copies the file into the VM, expands and installs it, selects it with xcode-select, accepts the license, runs the first launch, and adds the iOS Simulator runtime. Expect 30 to 60 minutes.
  6. -
- -

Build from Linux

-

The VM is an SSH host named macbox, so Xcode's command-line tools are one hop away:

-
ssh macbox xcodebuild -version
-ssh macbox xcrun simctl list devices available
-

Copy a project in with rsync or git clone it on the Mac, then run xcodebuild as you would on a Mac. For Expo and React Native apps, mac-sim run does the copy, the CocoaPods install, the build and the install into a simulator for you, with Metro on Linux: see the Expo guide.

-

To use Xcode's own window, open the VM's screen at http://127.0.0.1:6081/ or run ./macbox view local. Xcode draws with Metal on your GPU like the rest of macOS.

- -

Simulators and devices

-
    -
  • ./macbox pool creates a small pool of iOS Simulators tuned for the VM, mostly at 1x pixels, which is 4 to 9 times cheaper to draw than 3x. See iOS Simulator on Linux.
  • -
  • Keep Simulator.app closed when you can. It opens a window per booted simulator and doubles the GPU's work; mac-sim and T3 Code read the simulator's screen directly.
  • -
  • For an .ipa on a real iPhone or TestFlight, the phone-build tool builds in the VM (after Expo's free EAS cloud builds). Signing for devices needs Apple's paid Developer Program.
  • -
- -

Common questions

-

Do I need an Apple Account inside macOS?

-

No. Setup Assistant can skip it. You only sign in at developer.apple.com, in your own browser, to download the .xip.

-

Is it fast enough to use?

-

On an Intel Arrow Lake iGPU, a 1x iOS Simulator renders a heavy Liquid Glass scene at 92 to 96 fps. Builds use the VM's vCPUs (8 in that setup); a first Expo build takes 2 to 15 minutes and later builds are incremental. Other hardware hasn't been measured yet.

-

Is it legal?

-

Apple's macOS license allows macOS only on Apple-branded hardware, so running it in a VM on a PC breaches that agreement. macbox ships no Apple software, and compliance with Apple's terms is your responsibility.

-
diff --git a/site/pages/index.html b/site/pages/index.html deleted file mode 100644 index 24969a0..0000000 --- a/site/pages/index.html +++ /dev/null @@ -1,223 +0,0 @@ -title: macbox: give your AI agents a Mac and iOS Simulators on Linux -description: macbox runs macOS, Xcode and iOS Simulators on your Linux machine with your own GPU, so Claude Code, Codex and T3 Code can build, tap and test your iPhone app. ---- -
-
-

macbox

-

Give your agents a Mac.

-

macOS, Xcode and real iPhone simulators at up to 120 fps, on your Linux machine and its own GPU. Your coding agent builds the app, taps through it and checks it for itself.

- -

Works with

    -
  • Claude Code
  • -
  • Codex
  • -
  • T3 Code
  • -
-
-
- - - The macOS 26 desktop in macbox on Linux: Simulator.app shows an iPhone 17 Pro running Nimbus, a weather app, next to Nimbus's website in Safari - -
The full, uncropped screen of macOS 26 in macbox, running on Linux with an Intel integrated GPU. Nimbus is a demo app built for this page.
-
-
- -
-
-
-

Everything an agent needs to test an iPhone app.

-

Coding agents write iPhone apps well, but they can't see them run. macbox gives each one a real simulator and the tools to use it like a developer.

-
-
-
-
-

A real iOS Simulator.

-

Xcode builds the app and installs it in an iOS 26 Simulator. Then the agent taps, types, scrolls and takes screenshots, just like you would. Expo and React Native work too.

-
- -
-
-

60 fps

-

Smooth, measured.

-

The agent records the animation and counts its frames. Done means none were dropped.

-
-
-

One simulator per checkout.

-

Several agents work side by side, each on its own simulator.

-
    -
  • slim 1feature/checkout
  • -
  • slim 2fix/login
  • -
  • sharpFree
  • -
  • fullWidgets, Dynamic Island
  • -
-
-
- -

Live in T3 Code.

-

The simulator streams into T3 Code's Device panel while the agent works. Tap in yourself whenever you like.

-
-
-

No Mac.

-

Just your own GPU.

-

macOS draws with Metal on your Intel or AMD graphics, and Linux keeps the GPU. An integrated one is enough.

-
-
-
-
- -
-
-
-

Works with the agents you already use.

-

The integrations ship with macbox and are maintained with it.

-
-
-

Claude Code

Gets the tools, and a skill that says when to open a simulator and how to test on it.

-

Codex

The same skill and tools, and a Simulators section in its AGENTS.md.

-

T3 Code

Shows each simulator live in the Device panel, and takes your taps.

-
-
./macbox agents install   # Claude Code and Codex
-./macbox t3 register      # T3 Code's Device panel
-

macbox isn't affiliated with or endorsed by Anthropic, OpenAI or T3. Their names and logos belong to them. How agents use macbox

-
-
- -
-
-
-

Performance

-

17 → 117 fps

-

As smooth as the iPhone's 120 Hz screen.

-

An iPhone 17 Pro simulator at 3x, an iPhone's real pixels, running a heavy Liquid Glass screen on an Intel integrated GPU: almost seven times what the GPU code macbox builds on manages. Three simulators at once still run at about 32 fps each.

-
-
- iOS Simulator at 3x in a Liquid Glass benchmark: 17.2 fps as upstream shipped it, 39.0 with the October 28 macbox build, 50.6 on November 5, 70.0 with Coherent, 117 with the build macbox makes now. -
-
- The exact numbers -
- - - - - - - - - -
WorkloadReims 2ce3209, upstreammacbox, Oct 28macbox, Nov 5, Coherent onmacbox now
iOS Simulator 3x (1206×2622, an iPhone's pixels)17.2 fps38.5 / 39.5 fps70.0 fps117 fps
Two 3x simulators at once51–54 fps each
Three 3x simulators at once31–32 fps each
iOS Simulator 1x (402×874), Liquid Glass53.5 fps95.8 / 92.5 fpsn/mn/m
iOS Simulator 2x (804×1748), Liquid Glass33.5 fps67.8 / 60.5 fpsn/mn/m
macOS desktop, Genie minimize at 3440×1440~12 frames19.5 frames29.5 / 30.5 framesn/m
-

Intel Core Ultra 7 265 (Arrow Lake iGPU), Mesa 26.2.4, macOS 26.7.1, iOS 26.5, a VM with 8 vCPUs and 12 GB. Frames counted at the simulator's own screen, after a warm-up, headless; n/m: not measured on that build. The iPhone 17 Pro's screen runs at up to 120 Hz, so one simulator is close to its limit; several share the GPU, about 105 frames a second in total. Coherent is on by default with an Arrow Lake iGPU, with a crash guard; one rare GPU hang under repeated boots of three simulators is still open. The GPU is the limit, so a faster GPU moves every number up; other GPUs haven't been measured yet. Method and patches: docs/performance.md.

-
-
-
- -
-
-
-

A real Mac, in a box on Linux.

-

macbox runs macOS in a virtual machine inside one Docker container. Unlike other ways of doing that, macOS draws with your machine's graphics card.

-
-
    -
  1. 1

    Install it on Linux.

    A PC or server with an Intel or AMD GPU. Your agent can do the whole setup.

  2. -
  3. 2

    Connect your agent.

    One command adds the tools and skills for Claude Code, Codex and T3 Code.

  4. -
  5. 3

    Let it test.

    Before it calls a UI change done, it builds, runs, taps, looks and measures.

  6. -
-
- Under the hood -

QEMU gives macOS Apple's own paravirtual GPU through Reims vGPU, and metal2vulkan runs macOS's Metal work on the host's Vulkan driver (Mesa). No GPU is passed through, so an integrated GPU is enough. After a short install in the VM's screen, everything else runs over SSH: macbox xcode installs the Xcode you download from Apple, macbox pool creates the simulators, and mac-sim copies a checkout into macOS, builds it there and runs Metro on Linux.

-
Linux host (KVM + a Vulkan GPU + Docker)
-└─ container macbox
-   └─ QEMU with Reims vGPU ──► metal2vulkan ──► Vulkan (Mesa) on your GPU
-      └─ macOS 26 Tahoe (x86-64), drawn with Metal
-         ├─ Xcode, CocoaPods, Node
-         ├─ iOS Simulators: a pool, one per agent checkout (mac-sim)
-         └─ T3 Code's device hub  ──► the Device panel, live
-

How the GPU path works

-
-
-
- -
-
-

Instead of a Mac, a cloud, or a slow VM.

-
-

Instead of buying a Mac

Use the Linux machine your agents already run on. One box, one copy of the code, no second computer to keep in sync.

-

Instead of cloud simulators

Everything runs on your hardware. No per-minute bill, and your code never leaves the machine.

-

Instead of Docker-OSX or OSX-KVM

Those draw macOS in software unless you hand a whole GPU to the VM. macbox gets macOS onto your GPU while Linux keeps it.

-
-

The full comparison

-
-
- -
-
-
-

Let your agent set it up.

-

macbox is written so an agent can do the whole install, the clicks in macOS's setup screens included. Paste this into Claude Code, Codex or T3 Code:

-
-
Set up macbox on this machine: https://github.com/TUNA-NOPE/macbox. Follow its AGENTS.md and ask me before changing the host.
-

It asks before it installs anything on the host, and needs two things from you: a macOS password, which you type into the VM's screen, and the Xcode download from Apple, which needs your Apple Account. Plan on an afternoon, mostly downloads and builds.

-
-

You'll need

-
    -
  • Linux on an x86-64 CPU with KVM and AVX2
  • -
  • An Intel or AMD GPU with Mesa's Vulkan driver
  • -
  • 16 GB of RAM and about 150 GB free on an SSD
  • -
  • Docker (rootless is fine) or Podman
  • -
-

macbox runs macOS 26 and iOS 26 simulators: the last versions Apple makes for Intel. NVIDIA isn't packaged yet, and AMD is supported upstream but untested here.

-
-
- Or do it yourself -
git clone https://github.com/TUNA-NOPE/macbox && cd macbox
-./macbox init      # config and an SSH key
-./macbox doctor    # checks KVM, the GPU, Docker, disk
-./macbox build     # the GPU stack (20 to 60 min)
-./macbox create    # a VM; macOS downloads from Apple
-./macbox up        # the screen: http://127.0.0.1:6081/
-./macbox next      # what's done, and the next step
-

./macbox next always says what's done and what's next. The walkthrough

-
-
-
- -
-
-

Guides.

Start from what you're trying to do.

- {{guides}} -
-
- -
-
-

Questions people ask.

-
Can I run the iOS Simulator on Linux?

Not by itself: it's part of Xcode, which needs macOS. macbox runs macOS in a VM on Linux with the GPU attached, so the real Simulator runs on your own machine, with no Mac, no cloud account and no per-minute bill.

-
How do I give Claude Code or Codex an iOS Simulator on a Linux server?

Set up macbox, then run macbox agents install. Agents get mac-sim (a simulator per checkout: build, run, tap, screenshot, record), sim-fps (did that animation hold 60 fps?), and a skill that tells them when and how to use them. See the agents guide.

-
Does it work with T3 Code's Device panel?

Yes: macbox t3 register adds the VM as a device host, and the simulators stream live into the panel and take taps.

-
Is this Docker-OSX or OSX-KVM with GPU acceleration?

Those boot macOS in QEMU too, but macOS gets Metal only when you pass a GPU it has drivers for through to the VM (VFIO), which takes that GPU away from the host. macbox uses Reims vGPU instead: Apple's own paravirtual GPU device, run on the host's Vulkan driver. The host keeps its GPU, macOS gets Metal, and an integrated GPU is enough.

-
Can I build and run an Expo or React Native iOS app on Linux?

Yes. mac-sim run copies the checkout into macOS, builds it with Xcode and CocoaPods, and installs it in the simulator. Metro runs on Linux, so JavaScript edits arrive by Fast Refresh. The Expo guide covers Release builds and Expo Go.

-
Real iPhones and TestFlight?

phone-build makes .ipa builds (Expo's free EAS cloud builds first, then locally in the VM) and uploads to TestFlight. Signing for devices needs Apple's paid Developer Program.

-
What can't it do?

Run macOS 27, Xcode 27 or iOS 27's simulators, which Apple ships for Apple silicon only. And it can't make running macOS on non-Apple hardware compliant with Apple's license: see below.

-
Is it free?

For noncommercial use, yes: macbox's own code is under the PolyForm Noncommercial License 1.0.0 (yourself, a hobby, research, teaching, a charity). Commercial use needs the author's permission: open an issue to ask.

-
-

Apple's license. macbox ships no Apple software. macOS, Xcode and the simulator runtimes download from Apple under Apple's terms, and you alone are responsible for complying with them. Apple's software license agreement for macOS allows it to run only on Apple-branded hardware; running it in a VM on other hardware breaches that agreement. macbox comes as is, with no warranty.

-
-
-
- -
-
-

Give your agents a Mac.

-

Hand your agent the repo, and let it set up the rest.

- -
-
diff --git a/site/static/favicon.svg b/site/static/favicon.svg deleted file mode 100644 index 1b9c242..0000000 --- a/site/static/favicon.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/site/static/images/phone-cities.webp b/site/static/images/phone-cities.webp deleted file mode 100644 index fad8312..0000000 Binary files a/site/static/images/phone-cities.webp and /dev/null differ diff --git a/site/static/images/phone-today.webp b/site/static/images/phone-today.webp deleted file mode 100644 index 1930013..0000000 Binary files a/site/static/images/phone-today.webp and /dev/null differ diff --git a/agents/README.md b/src/agents/README.md similarity index 58% rename from agents/README.md rename to src/agents/README.md index 017d2db..4dcfcf8 100644 --- a/agents/README.md +++ b/src/agents/README.md @@ -9,12 +9,12 @@ What `macbox agents install` wires up for coding agents (Claude Code, Codex, and { "hooks": { "UserPromptSubmit": [ - { "hooks": [ { "type": "command", "command": "/path/to/macbox/agents/hooks/route-simulator.sh" } ] } + { "hooks": [ { "type": "command", "command": "/path/to/macbox/src/agents/hooks/route-simulator.sh" } ] } ] } } ``` -- **Skills**: `skills/simulators`, `skills/phone-builds` and `skills/macbox` are linked into `~/.claude/skills/` and `~/.agents/skills/`. -- **Commands**: `sims/bin/mac-sim` (it finds `mac-sim-remote` beside its real path and copies it to the Mac), `sim-fps`, `android-sim`, `android-gpu-desktop` and `skills/phone-builds/bin/phone-build` are linked into `~/.local/bin/`. -- **User units**: `sims/systemd/mac-sim-idle.{service,timer}` (enable the timer) and, with the Android part, `android-gpu-desktop.service`. +- **Skills**: `src/skills/simulators`, `src/skills/phone-builds` and `src/skills/macbox` are linked into `~/.claude/skills/` and `~/.agents/skills/`. +- **Commands**: `src/sims/bin/mac-sim` (it finds `mac-sim-remote` beside its real path and copies it to the Mac), `sim-fps`, `android-sim`, `android-gpu-desktop` and `src/skills/phone-builds/bin/phone-build` are linked into `~/.local/bin/`. +- **User units**: `src/sims/systemd/mac-sim-idle.{service,timer}` (enable the timer) and, with the Android part, `android-gpu-desktop.service`. diff --git a/agents/hooks/route-simulator.sh b/src/agents/hooks/route-simulator.sh similarity index 100% rename from agents/hooks/route-simulator.sh rename to src/agents/hooks/route-simulator.sh diff --git a/agents/simulators-snippet.md b/src/agents/simulators-snippet.md similarity index 100% rename from agents/simulators-snippet.md rename to src/agents/simulators-snippet.md diff --git a/bench/GenieBench/main.swift b/src/bench/GenieBench/main.swift similarity index 100% rename from bench/GenieBench/main.swift rename to src/bench/GenieBench/main.swift diff --git a/bench/GlassBench/main.swift b/src/bench/GlassBench/main.swift similarity index 100% rename from bench/GlassBench/main.swift rename to src/bench/GlassBench/main.swift diff --git a/bench/README.md b/src/bench/README.md similarity index 94% rename from bench/README.md rename to src/bench/README.md index 1949c09..051d656 100644 --- a/bench/README.md +++ b/src/bench/README.md @@ -1,6 +1,6 @@ # Benchmarks -The tools behind the numbers in [docs/performance.md](../docs/performance.md), for measuring your +The tools behind the numbers in [docs/performance.md](../../docs/performance.md), for measuring your own GPU, or a change, before and after. They run inside macOS; build them there once: ```sh diff --git a/bench/build.sh b/src/bench/build.sh similarity index 100% rename from bench/build.sh rename to src/bench/build.sh diff --git a/bench/scroll-local.html b/src/bench/scroll-local.html similarity index 100% rename from bench/scroll-local.html rename to src/bench/scroll-local.html diff --git a/bench/simfps.swift b/src/bench/simfps.swift similarity index 100% rename from bench/simfps.swift rename to src/bench/simfps.swift diff --git a/container/build-reims.sh b/src/container/build-reims.sh similarity index 96% rename from container/build-reims.sh rename to src/container/build-reims.sh index 430ebe0..a817641 100755 --- a/container/build-reims.sh +++ b/src/container/build-reims.sh @@ -14,7 +14,7 @@ # $MACBOX_HOME/build, so later builds are incremental. set -euo pipefail : "${MACBOX_HOME:?}" "${MACBOX_REPO:?}" -. "$MACBOX_REPO/versions.env" +. "$MACBOX_REPO/src/versions.env" UPSTREAM=0 SWITCH=1 for a in "$@"; do case "$a" in @@ -66,12 +66,12 @@ if [ "$UPSTREAM" = 1 ]; then else say "Reims vGPU ${REIMS_REF:0:7} + patches/reims-vgpu" checkout "$R" "$REIMS_REPO" "$REIMS_REF" - apply "$R" "$MACBOX_REPO/patches/reims-vgpu" + apply "$R" "$MACBOX_REPO/src/patches/reims-vgpu" git -C "$R" submodule update -q --init vendor/qemu git -C "$R/vendor/qemu" fetch -q origin "$QEMU_REF" 2>/dev/null || true git -C "$R/vendor/qemu" checkout -q -f --detach "$QEMU_REF" git -C "$R/vendor/qemu" am --abort >/dev/null 2>&1 || true - apply "$R/vendor/qemu" "$MACBOX_REPO/patches/qemu" + apply "$R/vendor/qemu" "$MACBOX_REPO/src/patches/qemu" SUFFIX=-macbox fi COMMIT=$(git -C "$R" rev-parse --short HEAD) @@ -84,7 +84,7 @@ if [ "$UPSTREAM" = 0 ]; then M="$SRC/metal2vulkan" say "metal2vulkan ${M2V_REF:0:8} + patches/metal2vulkan" checkout "$M" "$M2V_REPO" "$M2V_REF" - apply "$M" "$MACBOX_REPO/patches/metal2vulkan" + apply "$M" "$MACBOX_REPO/src/patches/metal2vulkan" cat >>"$R/Cargo.toml" </dev/null; then # --gpu: H.264 on the GPU's encoder (VA-API) where it has one. setsid wayvnc --gpu --output=HEADLESS-1 --max-fps=60 127.0.0.1 5901 >"$L/wayvnc.log" 2>&1 /dev/null || echo selkies)" >/dev/null +"$MACBOX_REPO/src/container/stream-up.sh" "$(cat "$RUN/stream" 2>/dev/null || echo selkies)" >/dev/null echo "WAYLAND_DISPLAY=$WAYLAND_DISPLAY" diff --git a/container/stream-up.sh b/src/container/stream-up.sh similarity index 99% rename from container/stream-up.sh rename to src/container/stream-up.sh index 55f6828..06d5ca5 100755 --- a/container/stream-up.sh +++ b/src/container/stream-up.sh @@ -11,7 +11,7 @@ # on first use (pip, the version versions.env pins). set -euo pipefail : "${MACBOX_HOME:?}" "${MACBOX_REPO:?}" -. "$MACBOX_REPO/versions.env" +. "$MACBOX_REPO/src/versions.env" export XDG_RUNTIME_DIR=/tmp/xdg L="$MACBOX_HOME/logs" RUN="$MACBOX_HOME/run" VENV="$MACBOX_HOME/selkies-venv" mkdir -p "$L" "$RUN" diff --git a/docker/Dockerfile b/src/docker/Dockerfile similarity index 100% rename from docker/Dockerfile rename to src/docker/Dockerfile diff --git a/docker/sway.conf b/src/docker/sway.conf similarity index 75% rename from docker/sway.conf rename to src/docker/sway.conf index f6c2884..67a9820 100644 --- a/docker/sway.conf +++ b/src/docker/sway.conf @@ -1,4 +1,4 @@ -# The private headless sway the VM's window opens in (container/display-up.sh). The output's +# The private headless sway the VM's window opens in (src/container/display-up.sh). The output's # size follows the Mac's screen; the window fills it, one guest pixel per output pixel. output HEADLESS-1 mode 1920x1080@60Hz position 0 0 bg #000000 solid_color default_border none diff --git a/guest/README.md b/src/guest/README.md similarity index 100% rename from guest/README.md rename to src/guest/README.md diff --git a/guest/bin/build-serve-sim-x86.sh b/src/guest/bin/build-serve-sim-x86.sh similarity index 100% rename from guest/bin/build-serve-sim-x86.sh rename to src/guest/bin/build-serve-sim-x86.sh diff --git a/guest/bin/sim-stream-settings.sh b/src/guest/bin/sim-stream-settings.sh similarity index 100% rename from guest/bin/sim-stream-settings.sh rename to src/guest/bin/sim-stream-settings.sh diff --git a/guest/macbox-guest b/src/guest/macbox-guest similarity index 99% rename from guest/macbox-guest rename to src/guest/macbox-guest index 80fc5c6..ed2dd33 100755 --- a/guest/macbox-guest +++ b/src/guest/macbox-guest @@ -1,6 +1,6 @@ #!/bin/bash # macbox-guest: sets up and checks macOS inside a macbox VM. It runs as the guest's user, usually -# over SSH from the host (`macbox provision` copies guest/ to ~/.macbox/ and runs this). Every +# over SSH from the host (`macbox provision` copies src/guest/ to ~/.macbox/ and runs this). Every # subcommand can be run again: it says what it did ("done"), what was already so ("ok"), and what # is left ("todo"). It lives at ~/.macbox/macbox-guest (linked from ~/.macbox/bin), beside bin/ and share/. # @@ -23,7 +23,7 @@ # share/versions.env. macOS's own bash is 3.2, so this script avoids newer bash features. set -euo pipefail -ROOT="$(cd "$(dirname "$0")" && pwd)" # ~/.macbox, or guest/ in a checkout of the repo +ROOT="$(cd "$(dirname "$0")" && pwd)" # ~/.macbox, or src/guest/ in a checkout of the repo SHARE="$ROOT/share" MB="$HOME/.macbox" # where builds, downloads and state go SRC="$MB/src" @@ -762,7 +762,7 @@ ss_loaded() { launchctl print "gui/$(id -u)/$SS_LABEL" >/dev/null 2>&1; } cmd_stream_settings() { case "${1:-status}" in install) - [ -f "$MB/bin/sim-stream-settings.sh" ] || die "no $MB/bin/sim-stream-settings.sh (copy guest/ to ~/.macbox first)" + [ -f "$MB/bin/sim-stream-settings.sh" ] || die "no $MB/bin/sim-stream-settings.sh (copy src/guest/ to ~/.macbox first)" mkdir -p "$(dirname "$SS_PLIST")" if [ -f "$SS_PLIST" ] && [ "$(cat "$SS_PLIST")" = "$(ss_plist)" ] && ss_loaded; then ok "stream settings agent ($SS_LABEL)"; return diff --git a/guest/share/setmode.swift b/src/guest/share/setmode.swift similarity index 100% rename from guest/share/setmode.swift rename to src/guest/share/setmode.swift diff --git a/guest/share/versions.env b/src/guest/share/versions.env similarity index 100% rename from guest/share/versions.env rename to src/guest/share/versions.env diff --git a/lib/vmctl.py b/src/lib/vmctl.py similarity index 100% rename from lib/vmctl.py rename to src/lib/vmctl.py diff --git a/patches/README.md b/src/patches/README.md similarity index 92% rename from patches/README.md rename to src/patches/README.md index 0e50ce0..e364891 100644 --- a/patches/README.md +++ b/src/patches/README.md @@ -1,7 +1,7 @@ # Patches -`macbox build` applies these on top of the commits [versions.env](../versions.env) pins -(`container/build-reims.sh`). `macbox build --upstream` applies none of them. +`macbox build` applies these on top of the commits [src/versions.env](../versions.env) pins +(`src/container/build-reims.sh`). `macbox build --upstream` applies none of them. Together they are the build that has run day to day since 2026-11-09 on an Intel Arrow Lake iGPU (Core Ultra 7 265, Mesa 26.2.4 ANV), "production I". Each series rebuilds that build's sources @@ -11,7 +11,7 @@ been committed by accident. Patches up to metal2vulkan 0034, Reims 0025 and QEMU earlier "cohwl" build (2026-11-05). None of it is upstream yet. Most of the new code sits behind a switch and does nothing until it is set. What macbox turns on -is in [docs/performance.md](../docs/performance.md#gpu-tuning-switches). +is in [docs/performance.md](../../docs/performance.md#gpu-tuning-switches). ## metal2vulkan (on `development` at 0db5825a), 92 patches @@ -25,7 +25,7 @@ is in [docs/performance.md](../docs/performance.md#gpu-tuning-switches). | 0006, 0007 pass timer | a diagnostic, off unless `M2V_PASS_TIMES` is set: GPU time per render pass and an image census | | 0008 `tile_stored_only`, `tile_narrow_barriers` | live switches for two tile-memory experiments; off | | 0009–0012 `surface_lazy` | a large surface's optimal image is kept beside its pages, and its bytes are brought up to date only when something reads them, instead of after every pass | -| 0013–0024, 0027–0034 Coherent (`surface_coherent`) | trap-coherent surfaces: QEMU write-protects or poisons a surface's guest pages (patches/qemu), so the GPU's image can stay ahead of the pages and the guest CPU's first touch of a page syncs exactly that page. This removes the remaining copies between guest RAM and the GPU. The later patches fix ordering cases the lanes found: copies back and in around held batches, writes that reach a held batch past later command buffers, and counters for each fallback. | +| 0013–0024, 0027–0034 Coherent (`surface_coherent`) | trap-coherent surfaces: QEMU write-protects or poisons a surface's guest pages (src/patches/qemu), so the GPU's image can stay ahead of the pages and the guest CPU's first touch of a page syncs exactly that page. This removes the remaining copies between guest RAM and the GPU. The later patches fix ordering cases the lanes found: copies back and in around held batches, writes that reach a held batch past later command buffers, and counters for each fallback. | | 0025, 0026 flat32 | a flat dispatch whose grid fits counts in 32 bits (64 bits past 2^32 threads). The simulator's 1206x2622 masked-blit kernel went from 4.85 to 1.13 ms. Always on. | | 0035–0039, 0041, 0049 grouped completion | batches complete in groups (live `group_batches`, up to 64; `group_deadline_us`), a held group goes when a host waits on a shared event or Coherent waits to settle, and `group_keep=0` / `group_events=0` port a fix that ended fence timeouts under several simulators. On with Coherent | | 0040 flat variant | the flat dispatch stays SIMD16 and counts a 1-D workgroup from its id. Always on | @@ -33,7 +33,7 @@ is in [docs/performance.md](../docs/performance.md#gpu-tuning-switches). | 0045, 0046 recycled images | host-copied textures' images that the host writes too are recycled | | 0050, 0051, 0058–0061, 0069, 0070 surface fixes | `surface_lazy_max_texels`, `surface_twin_reader_first`, `surface_usage_shadow_image`, `surface_coherent_own_back`, `surface_lazy_open_ids`, `surface_twin_make_once` (a race between two textures over one surface: 91 → 100 fps over 12 boots). All but `surface_usage_shadow_image` on with Coherent | | 0085 `inline_lazy`, 0092 `inline_checks` | a lazy surface's first pass instance recorded inline; a batch's submission checks run in the scheduler's pass. On with Coherent | -| 0062, 0068, 0076, 0077, 0080, 0081, 0083, 0084, 0086, 0090 experiments | `xr_unused_bits_off`, `surface_coherent_writer_wins`, `M2V_FLAT_TILE`, `shared_ccs`, `host_mutable`, `batch_end_light`, `view_render_direct`, `precise_barriers`, `checks_first`: live switches, all off. Most are in [docs/performance.md](../docs/performance.md#tried-no-gain) | +| 0062, 0068, 0076, 0077, 0080, 0081, 0083, 0084, 0086, 0090 experiments | `xr_unused_bits_off`, `surface_coherent_writer_wins`, `M2V_FLAT_TILE`, `shared_ccs`, `host_mutable`, `batch_end_light`, `view_render_direct`, `precise_barriers`, `checks_first`: live switches, all off. Most are in [docs/performance.md](../../docs/performance.md#tried-no-gain) | | 0047, 0048, 0052–0057, 0063–0067, 0071–0075, 0078, 0079, 0082, 0086–0089, 0091 diagnostics | the pass timer's units and censuses, logs of views, twins, barriers and the scheduler, counters of why shadows copy back, and `M2V_PENDING_AUDIT` (command buffers begun while their submission is pending). Off unless their variable is set | ## Reims vGPU (on 7198fe6), 33 patches diff --git a/patches/metal2vulkan/0001-env-gated-Arrow-Lake-S-facts-and-deviati.patch b/src/patches/metal2vulkan/0001-env-gated-Arrow-Lake-S-facts-and-deviati.patch similarity index 100% rename from patches/metal2vulkan/0001-env-gated-Arrow-Lake-S-facts-and-deviati.patch rename to src/patches/metal2vulkan/0001-env-gated-Arrow-Lake-S-facts-and-deviati.patch diff --git a/patches/metal2vulkan/0002-read-the-release-s-pixel-format-table-wi.patch b/src/patches/metal2vulkan/0002-read-the-release-s-pixel-format-table-wi.patch similarity index 100% rename from patches/metal2vulkan/0002-read-the-release-s-pixel-format-table-wi.patch rename to src/patches/metal2vulkan/0002-read-the-release-s-pixel-format-table-wi.patch diff --git a/patches/metal2vulkan/0003-live-experiment-switches-M2V_LIVE-driver.patch b/src/patches/metal2vulkan/0003-live-experiment-switches-M2V_LIVE-driver.patch similarity index 100% rename from patches/metal2vulkan/0003-live-experiment-switches-M2V_LIVE-driver.patch rename to src/patches/metal2vulkan/0003-live-experiment-switches-M2V_LIVE-driver.patch diff --git a/patches/metal2vulkan/0004-live-switches-host_rt_in_place-and-shado.patch b/src/patches/metal2vulkan/0004-live-switches-host_rt_in_place-and-shado.patch similarity index 100% rename from patches/metal2vulkan/0004-live-switches-host_rt_in_place-and-shado.patch rename to src/patches/metal2vulkan/0004-live-switches-host_rt_in_place-and-shado.patch diff --git a/patches/metal2vulkan/0005-order-uses-through-two-imports-of-the-sa.patch b/src/patches/metal2vulkan/0005-order-uses-through-two-imports-of-the-sa.patch similarity index 100% rename from patches/metal2vulkan/0005-order-uses-through-two-imports-of-the-sa.patch rename to src/patches/metal2vulkan/0005-order-uses-through-two-imports-of-the-sa.patch diff --git a/patches/metal2vulkan/0006-diagnostic-pass-timer-M2V_PASS_TIMES-and.patch b/src/patches/metal2vulkan/0006-diagnostic-pass-timer-M2V_PASS_TIMES-and.patch similarity index 100% rename from patches/metal2vulkan/0006-diagnostic-pass-timer-M2V_PASS_TIMES-and.patch rename to src/patches/metal2vulkan/0006-diagnostic-pass-timer-M2V_PASS_TIMES-and.patch diff --git a/patches/metal2vulkan/0007-diagnostic-the-pass-timer-s-window-follo.patch b/src/patches/metal2vulkan/0007-diagnostic-the-pass-timer-s-window-follo.patch similarity index 100% rename from patches/metal2vulkan/0007-diagnostic-the-pass-timer-s-window-follo.patch rename to src/patches/metal2vulkan/0007-diagnostic-the-pass-timer-s-window-follo.patch diff --git a/patches/metal2vulkan/0008-live-switches-tile_stored_only-and-tile_.patch b/src/patches/metal2vulkan/0008-live-switches-tile_stored_only-and-tile_.patch similarity index 100% rename from patches/metal2vulkan/0008-live-switches-tile_stored_only-and-tile_.patch rename to src/patches/metal2vulkan/0008-live-switches-tile_stored_only-and-tile_.patch diff --git a/patches/metal2vulkan/0009-live-switch-surface_lazy-a-large-surface.patch b/src/patches/metal2vulkan/0009-live-switch-surface_lazy-a-large-surface.patch similarity index 100% rename from patches/metal2vulkan/0009-live-switch-surface_lazy-a-large-surface.patch rename to src/patches/metal2vulkan/0009-live-switch-surface_lazy-a-large-surface.patch diff --git a/patches/metal2vulkan/0010-surface_lazy-a-commit-does-nothing-while.patch b/src/patches/metal2vulkan/0010-surface_lazy-a-commit-does-nothing-while.patch similarity index 100% rename from patches/metal2vulkan/0010-surface_lazy-a-commit-does-nothing-while.patch rename to src/patches/metal2vulkan/0010-surface_lazy-a-commit-does-nothing-while.patch diff --git a/patches/metal2vulkan/0011-surface_lazy-name-the-refused-takes-scope-them-and-l.patch b/src/patches/metal2vulkan/0011-surface_lazy-name-the-refused-takes-scope-them-and-l.patch similarity index 100% rename from patches/metal2vulkan/0011-surface_lazy-name-the-refused-takes-scope-them-and-l.patch rename to src/patches/metal2vulkan/0011-surface_lazy-name-the-refused-takes-scope-them-and-l.patch diff --git a/patches/metal2vulkan/0012-surface_lazy-register-a-surface-that-leaves-writes-a.patch b/src/patches/metal2vulkan/0012-surface_lazy-register-a-surface-that-leaves-writes-a.patch similarity index 100% rename from patches/metal2vulkan/0012-surface_lazy-register-a-surface-that-leaves-writes-a.patch rename to src/patches/metal2vulkan/0012-surface_lazy-register-a-surface-that-leaves-writes-a.patch diff --git a/patches/metal2vulkan/0013-trap-coherent-surfaces-behind-surface_co.patch b/src/patches/metal2vulkan/0013-trap-coherent-surfaces-behind-surface_co.patch similarity index 100% rename from patches/metal2vulkan/0013-trap-coherent-surfaces-behind-surface_co.patch rename to src/patches/metal2vulkan/0013-trap-coherent-surfaces-behind-surface_co.patch diff --git a/patches/metal2vulkan/0014-a-rehearsal-of-a-coherent-surface-and-a-.patch b/src/patches/metal2vulkan/0014-a-rehearsal-of-a-coherent-surface-and-a-.patch similarity index 100% rename from patches/metal2vulkan/0014-a-rehearsal-of-a-coherent-surface-and-a-.patch rename to src/patches/metal2vulkan/0014-a-rehearsal-of-a-coherent-surface-and-a-.patch diff --git a/patches/metal2vulkan/0015-a-coherent-surface-answers-to-what-it-co.patch b/src/patches/metal2vulkan/0015-a-coherent-surface-answers-to-what-it-co.patch similarity index 100% rename from patches/metal2vulkan/0015-a-coherent-surface-answers-to-what-it-co.patch rename to src/patches/metal2vulkan/0015-a-coherent-surface-answers-to-what-it-co.patch diff --git a/patches/metal2vulkan/0016-the-window-s-cost-lane-beside-the-plain-.patch b/src/patches/metal2vulkan/0016-the-window-s-cost-lane-beside-the-plain-.patch similarity index 100% rename from patches/metal2vulkan/0016-the-window-s-cost-lane-beside-the-plain-.patch rename to src/patches/metal2vulkan/0016-the-window-s-cost-lane-beside-the-plain-.patch diff --git a/patches/metal2vulkan/0017-surface-coherent-a-CPU-write-opens-the-whole-surface.patch b/src/patches/metal2vulkan/0017-surface-coherent-a-CPU-write-opens-the-whole-surface.patch similarity index 100% rename from patches/metal2vulkan/0017-surface-coherent-a-CPU-write-opens-the-whole-surface.patch rename to src/patches/metal2vulkan/0017-surface-coherent-a-CPU-write-opens-the-whole-surface.patch diff --git a/patches/metal2vulkan/0018-surface-coherent-one-image-traps-per-surface.patch b/src/patches/metal2vulkan/0018-surface-coherent-one-image-traps-per-surface.patch similarity index 100% rename from patches/metal2vulkan/0018-surface-coherent-one-image-traps-per-surface.patch rename to src/patches/metal2vulkan/0018-surface-coherent-one-image-traps-per-surface.patch diff --git a/patches/metal2vulkan/0019-surface-lazy-an-attachment-read-copies-the-image-not.patch b/src/patches/metal2vulkan/0019-surface-lazy-an-attachment-read-copies-the-image-not.patch similarity index 100% rename from patches/metal2vulkan/0019-surface-lazy-an-attachment-read-copies-the-image-not.patch rename to src/patches/metal2vulkan/0019-surface-lazy-an-attachment-read-copies-the-image-not.patch diff --git a/patches/metal2vulkan/0020-surface-lazy-one-image-for-a-surface-s-textures.patch b/src/patches/metal2vulkan/0020-surface-lazy-one-image-for-a-surface-s-textures.patch similarity index 100% rename from patches/metal2vulkan/0020-surface-lazy-one-image-for-a-surface-s-textures.patch rename to src/patches/metal2vulkan/0020-surface-lazy-one-image-for-a-surface-s-textures.patch diff --git a/patches/metal2vulkan/0021-surface-twin-the-lifetime-lane-copies-in-through-the.patch b/src/patches/metal2vulkan/0021-surface-twin-the-lifetime-lane-copies-in-through-the.patch similarity index 100% rename from patches/metal2vulkan/0021-surface-twin-the-lifetime-lane-copies-in-through-the.patch rename to src/patches/metal2vulkan/0021-surface-twin-the-lifetime-lane-copies-in-through-the.patch diff --git a/patches/metal2vulkan/0022-coherent-per-range-marks-host-reads-and-writes-untra.patch b/src/patches/metal2vulkan/0022-coherent-per-range-marks-host-reads-and-writes-untra.patch similarity index 100% rename from patches/metal2vulkan/0022-coherent-per-range-marks-host-reads-and-writes-untra.patch rename to src/patches/metal2vulkan/0022-coherent-per-range-marks-host-reads-and-writes-untra.patch diff --git a/patches/metal2vulkan/0023-coherent-a-signal-is-seen-once-the-writes-before-it-.patch b/src/patches/metal2vulkan/0023-coherent-a-signal-is-seen-once-the-writes-before-it-.patch similarity index 100% rename from patches/metal2vulkan/0023-coherent-a-signal-is-seen-once-the-writes-before-it-.patch rename to src/patches/metal2vulkan/0023-coherent-a-signal-is-seen-once-the-writes-before-it-.patch diff --git a/patches/metal2vulkan/0024-coherent-a-held-batch-copies-in-what-the-CPU-wrote-b.patch b/src/patches/metal2vulkan/0024-coherent-a-held-batch-copies-in-what-the-CPU-wrote-b.patch similarity index 100% rename from patches/metal2vulkan/0024-coherent-a-held-batch-copies-in-what-the-CPU-wrote-b.patch rename to src/patches/metal2vulkan/0024-coherent-a-held-batch-copies-in-what-the-CPU-wrote-b.patch diff --git a/patches/metal2vulkan/0025-a-flat-grid-counts-in-32-bits-when-the-d.patch b/src/patches/metal2vulkan/0025-a-flat-grid-counts-in-32-bits-when-the-d.patch similarity index 100% rename from patches/metal2vulkan/0025-a-flat-grid-counts-in-32-bits-when-the-d.patch rename to src/patches/metal2vulkan/0025-a-flat-grid-counts-in-32-bits-when-the-d.patch diff --git a/patches/metal2vulkan/0026-a-flat-dispatch-past-2-32-threads-keeps-.patch b/src/patches/metal2vulkan/0026-a-flat-dispatch-past-2-32-threads-keeps-.patch similarity index 100% rename from patches/metal2vulkan/0026-a-flat-dispatch-past-2-32-threads-keeps-.patch rename to src/patches/metal2vulkan/0026-a-flat-dispatch-past-2-32-threads-keeps-.patch diff --git a/patches/metal2vulkan/0027-coherent-late-copies-in-keep-writes-the-pages-lack-o.patch b/src/patches/metal2vulkan/0027-coherent-late-copies-in-keep-writes-the-pages-lack-o.patch similarity index 100% rename from patches/metal2vulkan/0027-coherent-late-copies-in-keep-writes-the-pages-lack-o.patch rename to src/patches/metal2vulkan/0027-coherent-late-copies-in-keep-writes-the-pages-lack-o.patch diff --git a/patches/metal2vulkan/0028-coherent-lanes-a-standing-after-a-wait-and-a-later-G.patch b/src/patches/metal2vulkan/0028-coherent-lanes-a-standing-after-a-wait-and-a-later-G.patch similarity index 100% rename from patches/metal2vulkan/0028-coherent-lanes-a-standing-after-a-wait-and-a-later-G.patch rename to src/patches/metal2vulkan/0028-coherent-lanes-a-standing-after-a-wait-and-a-later-G.patch diff --git a/patches/metal2vulkan/0029-coherent-a-copy-back-leaves-a-held-batch-s-record-he.patch b/src/patches/metal2vulkan/0029-coherent-a-copy-back-leaves-a-held-batch-s-record-he.patch similarity index 100% rename from patches/metal2vulkan/0029-coherent-a-copy-back-leaves-a-held-batch-s-record-he.patch rename to src/patches/metal2vulkan/0029-coherent-a-copy-back-leaves-a-held-batch-s-record-he.patch diff --git a/patches/metal2vulkan/0030-coherent-exact-late-copies-beside-held-writers-copy-.patch b/src/patches/metal2vulkan/0030-coherent-exact-late-copies-beside-held-writers-copy-.patch similarity index 100% rename from patches/metal2vulkan/0030-coherent-exact-late-copies-beside-held-writers-copy-.patch rename to src/patches/metal2vulkan/0030-coherent-exact-late-copies-beside-held-writers-copy-.patch diff --git a/patches/metal2vulkan/0031-coherent-split-plan_left_planned-from-plan_left-lane.patch b/src/patches/metal2vulkan/0031-coherent-split-plan_left_planned-from-plan_left-lane.patch similarity index 100% rename from patches/metal2vulkan/0031-coherent-split-plan_left_planned-from-plan_left-lane.patch rename to src/patches/metal2vulkan/0031-coherent-split-plan_left_planned-from-plan_left-lane.patch diff --git a/patches/metal2vulkan/0032-coherent-a-late-batch-keeps-held-records-and-owes-th.patch b/src/patches/metal2vulkan/0032-coherent-a-late-batch-keeps-held-records-and-owes-th.patch similarity index 100% rename from patches/metal2vulkan/0032-coherent-a-late-batch-keeps-held-records-and-owes-th.patch rename to src/patches/metal2vulkan/0032-coherent-a-late-batch-keeps-held-records-and-owes-th.patch diff --git a/patches/metal2vulkan/0033-lanes-a-CPU-write-reaching-a-held-batch-past-a-later.patch b/src/patches/metal2vulkan/0033-lanes-a-CPU-write-reaching-a-held-batch-past-a-later.patch similarity index 100% rename from patches/metal2vulkan/0033-lanes-a-CPU-write-reaching-a-held-batch-past-a-later.patch rename to src/patches/metal2vulkan/0033-lanes-a-CPU-write-reaching-a-held-batch-past-a-later.patch diff --git a/patches/metal2vulkan/0034-coherent-writes-reach-held-batches-past-later-comman.patch b/src/patches/metal2vulkan/0034-coherent-writes-reach-held-batches-past-later-comman.patch similarity index 100% rename from patches/metal2vulkan/0034-coherent-writes-reach-held-batches-past-later-comman.patch rename to src/patches/metal2vulkan/0034-coherent-writes-reach-held-batches-past-later-comman.patch diff --git a/patches/metal2vulkan/0035-group_batches-live-switch-groups-up-to-16-batches.patch b/src/patches/metal2vulkan/0035-group_batches-live-switch-groups-up-to-16-batches.patch similarity index 100% rename from patches/metal2vulkan/0035-group_batches-live-switch-groups-up-to-16-batches.patch rename to src/patches/metal2vulkan/0035-group_batches-live-switch-groups-up-to-16-batches.patch diff --git a/patches/metal2vulkan/0036-no-group-kept-while-Coherent-s-wait_settled-waits-Ho.patch b/src/patches/metal2vulkan/0036-no-group-kept-while-Coherent-s-wait_settled-waits-Ho.patch similarity index 100% rename from patches/metal2vulkan/0036-no-group-kept-while-Coherent-s-wait_settled-waits-Ho.patch rename to src/patches/metal2vulkan/0036-no-group-kept-while-Coherent-s-wait_settled-waits-Ho.patch diff --git a/patches/metal2vulkan/0037-group-cap-64-live-group_batches-up-to-64-hold-delay-.patch b/src/patches/metal2vulkan/0037-group-cap-64-live-group_batches-up-to-64-hold-delay-.patch similarity index 100% rename from patches/metal2vulkan/0037-group-cap-64-live-group_batches-up-to-64-hold-delay-.patch rename to src/patches/metal2vulkan/0037-group-cap-64-live-group_batches-up-to-64-hold-delay-.patch diff --git a/patches/metal2vulkan/0038-a-shared-event-s-host-wait-sends-held-groups-HostWai.patch b/src/patches/metal2vulkan/0038-a-shared-event-s-host-wait-sends-held-groups-HostWai.patch similarity index 100% rename from patches/metal2vulkan/0038-a-shared-event-s-host-wait-sends-held-groups-HostWai.patch rename to src/patches/metal2vulkan/0038-a-shared-event-s-host-wait-sends-held-groups-HostWai.patch diff --git a/patches/metal2vulkan/0039-live-group_deadline_us-a-group-held-past-it-goes-at-.patch b/src/patches/metal2vulkan/0039-live-group_deadline_us-a-group-held-past-it-goes-at-.patch similarity index 100% rename from patches/metal2vulkan/0039-live-group_deadline_us-a-group-held-past-it-goes-at-.patch rename to src/patches/metal2vulkan/0039-live-group_deadline_us-a-group-held-past-it-goes-at-.patch diff --git a/patches/metal2vulkan/0040-the-flat-variant-stays-SIMD16-and-counts-a-1-D-workg.patch b/src/patches/metal2vulkan/0040-the-flat-variant-stays-SIMD16-and-counts-a-1-D-workg.patch similarity index 100% rename from patches/metal2vulkan/0040-the-flat-variant-stays-SIMD16-and-counts-a-1-D-workg.patch rename to src/patches/metal2vulkan/0040-the-flat-variant-stays-SIMD16-and-counts-a-1-D-workg.patch diff --git a/patches/metal2vulkan/0041-Add-grouped-completion-and-cross-import-coherence-ch.patch b/src/patches/metal2vulkan/0041-Add-grouped-completion-and-cross-import-coherence-ch.patch similarity index 100% rename from patches/metal2vulkan/0041-Add-grouped-completion-and-cross-import-coherence-ch.patch rename to src/patches/metal2vulkan/0041-Add-grouped-completion-and-cross-import-coherence-ch.patch diff --git a/patches/metal2vulkan/0042-a-scheduled-signal-leaves-a-render-end-in-flight-on-.patch b/src/patches/metal2vulkan/0042-a-scheduled-signal-leaves-a-render-end-in-flight-on-.patch similarity index 100% rename from patches/metal2vulkan/0042-a-scheduled-signal-leaves-a-render-end-in-flight-on-.patch rename to src/patches/metal2vulkan/0042-a-scheduled-signal-leaves-a-render-end-in-flight-on-.patch diff --git a/patches/metal2vulkan/0043-lower-independent-queues-render-calls-on-a-bounded-s.patch b/src/patches/metal2vulkan/0043-lower-independent-queues-render-calls-on-a-bounded-s.patch similarity index 100% rename from patches/metal2vulkan/0043-lower-independent-queues-render-calls-on-a-bounded-s.patch rename to src/patches/metal2vulkan/0043-lower-independent-queues-render-calls-on-a-bounded-s.patch diff --git a/patches/metal2vulkan/0044-Assign-render-lowering-lanes-on-first-use-so-idle-qu.patch b/src/patches/metal2vulkan/0044-Assign-render-lowering-lanes-on-first-use-so-idle-qu.patch similarity index 100% rename from patches/metal2vulkan/0044-Assign-render-lowering-lanes-on-first-use-so-idle-qu.patch rename to src/patches/metal2vulkan/0044-Assign-render-lowering-lanes-on-first-use-so-idle-qu.patch diff --git a/patches/metal2vulkan/0045-Recycle-host-copied-textures-images-that-the-host-wr.patch b/src/patches/metal2vulkan/0045-Recycle-host-copied-textures-images-that-the-host-wr.patch similarity index 100% rename from patches/metal2vulkan/0045-Recycle-host-copied-textures-images-that-the-host-wr.patch rename to src/patches/metal2vulkan/0045-Recycle-host-copied-textures-images-that-the-host-wr.patch diff --git a/patches/metal2vulkan/0046-Clarify-host-copy-initialization-of-recycled-images.patch b/src/patches/metal2vulkan/0046-Clarify-host-copy-initialization-of-recycled-images.patch similarity index 100% rename from patches/metal2vulkan/0046-Clarify-host-copy-initialization-of-recycled-images.patch rename to src/patches/metal2vulkan/0046-Clarify-host-copy-initialization-of-recycled-images.patch diff --git a/patches/metal2vulkan/0047-diagnostic-per-draw-units-live-pass_draws-and-a-pipe.patch b/src/patches/metal2vulkan/0047-diagnostic-per-draw-units-live-pass_draws-and-a-pipe.patch similarity index 100% rename from patches/metal2vulkan/0047-diagnostic-per-draw-units-live-pass_draws-and-a-pipe.patch rename to src/patches/metal2vulkan/0047-diagnostic-per-draw-units-live-pass_draws-and-a-pipe.patch diff --git a/patches/metal2vulkan/0048-diagnostic-name-a-copy-unit-s-images-in-the-pass-tim.patch b/src/patches/metal2vulkan/0048-diagnostic-name-a-copy-unit-s-images-in-the-pass-tim.patch similarity index 100% rename from patches/metal2vulkan/0048-diagnostic-name-a-copy-unit-s-images-in-the-pass-tim.patch rename to src/patches/metal2vulkan/0048-diagnostic-name-a-copy-unit-s-images-in-the-pass-tim.patch diff --git a/patches/metal2vulkan/0049-port-strong-d2da1714-behind-live-group_keep-0-group_.patch b/src/patches/metal2vulkan/0049-port-strong-d2da1714-behind-live-group_keep-0-group_.patch similarity index 100% rename from patches/metal2vulkan/0049-port-strong-d2da1714-behind-live-group_keep-0-group_.patch rename to src/patches/metal2vulkan/0049-port-strong-d2da1714-behind-live-group_keep-0-group_.patch diff --git a/patches/metal2vulkan/0050-live-surface_lazy_max_texels-keeps-large-surfaces-th.patch b/src/patches/metal2vulkan/0050-live-surface_lazy_max_texels-keeps-large-surfaces-th.patch similarity index 100% rename from patches/metal2vulkan/0050-live-surface_lazy_max_texels-keeps-large-surfaces-th.patch rename to src/patches/metal2vulkan/0050-live-surface_lazy_max_texels-keeps-large-surfaces-th.patch diff --git a/patches/metal2vulkan/0051-live-surface_twin_reader_first-a-lazy-surface-s-read.patch b/src/patches/metal2vulkan/0051-live-surface_twin_reader_first-a-lazy-surface-s-read.patch similarity index 100% rename from patches/metal2vulkan/0051-live-surface_twin_reader_first-a-lazy-surface-s-read.patch rename to src/patches/metal2vulkan/0051-live-surface_twin_reader_first-a-lazy-surface-s-read.patch diff --git a/patches/metal2vulkan/0052-diagnostic-compute-census-in-the-pass-timer.patch b/src/patches/metal2vulkan/0052-diagnostic-compute-census-in-the-pass-timer.patch similarity index 100% rename from patches/metal2vulkan/0052-diagnostic-compute-census-in-the-pass-timer.patch rename to src/patches/metal2vulkan/0052-diagnostic-compute-census-in-the-pass-timer.patch diff --git a/patches/metal2vulkan/0053-diagnostic-M2V_VIEW_SHADOW_LOG-names-the-views-that-.patch b/src/patches/metal2vulkan/0053-diagnostic-M2V_VIEW_SHADOW_LOG-names-the-views-that-.patch similarity index 100% rename from patches/metal2vulkan/0053-diagnostic-M2V_VIEW_SHADOW_LOG-names-the-views-that-.patch rename to src/patches/metal2vulkan/0053-diagnostic-M2V_VIEW_SHADOW_LOG-names-the-views-that-.patch diff --git a/patches/metal2vulkan/0054-diagnostic-overwrite_risk-by-site-in-the-coherent-ce.patch b/src/patches/metal2vulkan/0054-diagnostic-overwrite_risk-by-site-in-the-coherent-ce.patch similarity index 100% rename from patches/metal2vulkan/0054-diagnostic-overwrite_risk-by-site-in-the-coherent-ce.patch rename to src/patches/metal2vulkan/0054-diagnostic-overwrite_risk-by-site-in-the-coherent-ce.patch diff --git a/patches/metal2vulkan/0055-diagnostic-M2V_TWIN_LOG-says-why-a-texture-over-a-la.patch b/src/patches/metal2vulkan/0055-diagnostic-M2V_TWIN_LOG-says-why-a-texture-over-a-la.patch similarity index 100% rename from patches/metal2vulkan/0055-diagnostic-M2V_TWIN_LOG-says-why-a-texture-over-a-la.patch rename to src/patches/metal2vulkan/0055-diagnostic-M2V_TWIN_LOG-says-why-a-texture-over-a-la.patch diff --git a/patches/metal2vulkan/0056-diagnostic-M2V_BESIDE_LOG-names-the-commands-writing.patch b/src/patches/metal2vulkan/0056-diagnostic-M2V_BESIDE_LOG-names-the-commands-writing.patch similarity index 100% rename from patches/metal2vulkan/0056-diagnostic-M2V_BESIDE_LOG-names-the-commands-writing.patch rename to src/patches/metal2vulkan/0056-diagnostic-M2V_BESIDE_LOG-names-the-commands-writing.patch diff --git a/patches/metal2vulkan/0057-diagnostic-M2V_TWIN_LOG-also-names-views-apart-from-.patch b/src/patches/metal2vulkan/0057-diagnostic-M2V_TWIN_LOG-also-names-views-apart-from-.patch similarity index 100% rename from patches/metal2vulkan/0057-diagnostic-M2V_TWIN_LOG-also-names-views-apart-from-.patch rename to src/patches/metal2vulkan/0057-diagnostic-M2V_TWIN_LOG-also-names-views-apart-from-.patch diff --git a/patches/metal2vulkan/0058-live-surface_usage_shadow_image-a-lazy-surface-witho.patch b/src/patches/metal2vulkan/0058-live-surface_usage_shadow_image-a-lazy-surface-witho.patch similarity index 100% rename from patches/metal2vulkan/0058-live-surface_usage_shadow_image-a-lazy-surface-witho.patch rename to src/patches/metal2vulkan/0058-live-surface_usage_shadow_image-a-lazy-surface-witho.patch diff --git a/patches/metal2vulkan/0059-live-surface_coherent_own_back-a-trapping-surface-s-.patch b/src/patches/metal2vulkan/0059-live-surface_coherent_own_back-a-trapping-surface-s-.patch similarity index 100% rename from patches/metal2vulkan/0059-live-surface_coherent_own_back-a-trapping-surface-s-.patch rename to src/patches/metal2vulkan/0059-live-surface_coherent_own_back-a-trapping-surface-s-.patch diff --git a/patches/metal2vulkan/0060-surface_coherent_own_back-tags-own-copies-back-inste.patch b/src/patches/metal2vulkan/0060-surface_coherent_own_back-tags-own-copies-back-inste.patch similarity index 100% rename from patches/metal2vulkan/0060-surface_coherent_own_back-tags-own-copies-back-inste.patch rename to src/patches/metal2vulkan/0060-surface_coherent_own_back-tags-own-copies-back-inste.patch diff --git a/patches/metal2vulkan/0061-live-surface_lazy_open_ids-a-standing-s-command-buff.patch b/src/patches/metal2vulkan/0061-live-surface_lazy_open_ids-a-standing-s-command-buff.patch similarity index 100% rename from patches/metal2vulkan/0061-live-surface_lazy_open_ids-a-standing-s-command-buff.patch rename to src/patches/metal2vulkan/0061-live-surface_lazy_open_ids-a-standing-s-command-buff.patch diff --git a/patches/metal2vulkan/0062-live-xr_unused_bits_off-lab-ceiling-of-the-unused-bi.patch b/src/patches/metal2vulkan/0062-live-xr_unused_bits_off-lab-ceiling-of-the-unused-bi.patch similarity index 100% rename from patches/metal2vulkan/0062-live-xr_unused_bits_off-lab-ceiling-of-the-unused-bi.patch rename to src/patches/metal2vulkan/0062-live-xr_unused_bits_off-lab-ceiling-of-the-unused-bi.patch diff --git a/patches/metal2vulkan/0063-count-why-large-shadows-copy-back-lab-diagnostics-pr.patch b/src/patches/metal2vulkan/0063-count-why-large-shadows-copy-back-lab-diagnostics-pr.patch similarity index 100% rename from patches/metal2vulkan/0063-count-why-large-shadows-copy-back-lab-diagnostics-pr.patch rename to src/patches/metal2vulkan/0063-count-why-large-shadows-copy-back-lab-diagnostics-pr.patch diff --git a/patches/metal2vulkan/0064-count-copy-back-dispatches-by-site-lab-diagnostics.patch b/src/patches/metal2vulkan/0064-count-copy-back-dispatches-by-site-lab-diagnostics.patch similarity index 100% rename from patches/metal2vulkan/0064-count-copy-back-dispatches-by-site-lab-diagnostics.patch rename to src/patches/metal2vulkan/0064-count-copy-back-dispatches-by-site-lab-diagnostics.patch diff --git a/patches/metal2vulkan/0065-per-surface-defer-refusal-counters-and-coherent-stat.patch b/src/patches/metal2vulkan/0065-per-surface-defer-refusal-counters-and-coherent-stat.patch similarity index 100% rename from patches/metal2vulkan/0065-per-surface-defer-refusal-counters-and-coherent-stat.patch rename to src/patches/metal2vulkan/0065-per-surface-defer-refusal-counters-and-coherent-stat.patch diff --git a/patches/metal2vulkan/0066-print-who-tracks-second-over-trapped-pages-lab-diagn.patch b/src/patches/metal2vulkan/0066-print-who-tracks-second-over-trapped-pages-lab-diagn.patch similarity index 100% rename from patches/metal2vulkan/0066-print-who-tracks-second-over-trapped-pages-lab-diagn.patch rename to src/patches/metal2vulkan/0066-print-who-tracks-second-over-trapped-pages-lab-diagn.patch diff --git a/patches/metal2vulkan/0067-print-who-makes-a-large-lazy-surface-s-shadow-lazy-i.patch b/src/patches/metal2vulkan/0067-print-who-makes-a-large-lazy-surface-s-shadow-lazy-i.patch similarity index 100% rename from patches/metal2vulkan/0067-print-who-makes-a-large-lazy-surface-s-shadow-lazy-i.patch rename to src/patches/metal2vulkan/0067-print-who-makes-a-large-lazy-surface-s-shadow-lazy-i.patch diff --git a/patches/metal2vulkan/0068-lab-surface_coherent_writer_wins-live-switch-default.patch b/src/patches/metal2vulkan/0068-lab-surface_coherent_writer_wins-live-switch-default.patch similarity index 100% rename from patches/metal2vulkan/0068-lab-surface_coherent_writer_wins-live-switch-default.patch rename to src/patches/metal2vulkan/0068-lab-surface_coherent_writer_wins-live-switch-default.patch diff --git a/patches/metal2vulkan/0069-lab-surface_twin_make_once-live-switch-default-off-t.patch b/src/patches/metal2vulkan/0069-lab-surface_twin_make_once-live-switch-default-off-t.patch similarity index 100% rename from patches/metal2vulkan/0069-lab-surface_twin_make_once-live-switch-default-off-t.patch rename to src/patches/metal2vulkan/0069-lab-surface_twin_make_once-live-switch-default-off-t.patch diff --git a/patches/metal2vulkan/0070-lab-surface_twin_make_once-waits-per-surface-not-glo.patch b/src/patches/metal2vulkan/0070-lab-surface_twin_make_once-waits-per-surface-not-glo.patch similarity index 100% rename from patches/metal2vulkan/0070-lab-surface_twin_make_once-waits-per-surface-not-glo.patch rename to src/patches/metal2vulkan/0070-lab-surface_twin_make_once-waits-per-surface-not-glo.patch diff --git a/patches/metal2vulkan/0071-M2V_PENDING_AUDIT-diagnostic-begins-resets-of-comman.patch b/src/patches/metal2vulkan/0071-M2V_PENDING_AUDIT-diagnostic-begins-resets-of-comman.patch similarity index 100% rename from patches/metal2vulkan/0071-M2V_PENDING_AUDIT-diagnostic-begins-resets-of-comman.patch rename to src/patches/metal2vulkan/0071-M2V_PENDING_AUDIT-diagnostic-begins-resets-of-comman.patch diff --git a/patches/metal2vulkan/0072-pending-audit-reads-each-semaphore-through-the-devic.patch b/src/patches/metal2vulkan/0072-pending-audit-reads-each-semaphore-through-the-devic.patch similarity index 100% rename from patches/metal2vulkan/0072-pending-audit-reads-each-semaphore-through-the-devic.patch rename to src/patches/metal2vulkan/0072-pending-audit-reads-each-semaphore-through-the-devic.patch diff --git a/patches/metal2vulkan/0073-pending-audit-reads-no-fence-and-only-long-lived-tim.patch b/src/patches/metal2vulkan/0073-pending-audit-reads-no-fence-and-only-long-lived-tim.patch similarity index 100% rename from patches/metal2vulkan/0073-pending-audit-reads-no-fence-and-only-long-lived-tim.patch rename to src/patches/metal2vulkan/0073-pending-audit-reads-no-fence-and-only-long-lived-tim.patch diff --git a/patches/metal2vulkan/0074-pending-audit-device-index-no-longer-shadowed-by-the.patch b/src/patches/metal2vulkan/0074-pending-audit-device-index-no-longer-shadowed-by-the.patch similarity index 100% rename from patches/metal2vulkan/0074-pending-audit-device-index-no-longer-shadowed-by-the.patch rename to src/patches/metal2vulkan/0074-pending-audit-device-index-no-longer-shadowed-by-the.patch diff --git a/patches/metal2vulkan/0075-pending-audit-forgets-destroyed-devices-and-a-hit-li.patch b/src/patches/metal2vulkan/0075-pending-audit-forgets-destroyed-devices-and-a-hit-li.patch similarity index 100% rename from patches/metal2vulkan/0075-pending-audit-forgets-destroyed-devices-and-a-hit-li.patch rename to src/patches/metal2vulkan/0075-pending-audit-forgets-destroyed-devices-and-a-hit-li.patch diff --git a/patches/metal2vulkan/0076-lab-M2V_FLAT_TILE-TWxTH-a-flat-grid-s-32-bit-index-w.patch b/src/patches/metal2vulkan/0076-lab-M2V_FLAT_TILE-TWxTH-a-flat-grid-s-32-bit-index-w.patch similarity index 100% rename from patches/metal2vulkan/0076-lab-M2V_FLAT_TILE-TWxTH-a-flat-grid-s-32-bit-index-w.patch rename to src/patches/metal2vulkan/0076-lab-M2V_FLAT_TILE-TWxTH-a-flat-grid-s-32-bit-index-w.patch diff --git a/patches/metal2vulkan/0077-lab-live-shared_ccs-1-a-GPU-written-Shared-Managed-t.patch b/src/patches/metal2vulkan/0077-lab-live-shared_ccs-1-a-GPU-written-Shared-Managed-t.patch similarity index 100% rename from patches/metal2vulkan/0077-lab-live-shared_ccs-1-a-GPU-written-Shared-Managed-t.patch rename to src/patches/metal2vulkan/0077-lab-live-shared_ccs-1-a-GPU-written-Shared-Managed-t.patch diff --git a/patches/metal2vulkan/0078-pending-audit-skips-semaphores-that-read-0-binary-se.patch b/src/patches/metal2vulkan/0078-pending-audit-skips-semaphores-that-read-0-binary-se.patch similarity index 100% rename from patches/metal2vulkan/0078-pending-audit-skips-semaphores-that-read-0-binary-se.patch rename to src/patches/metal2vulkan/0078-pending-audit-skips-semaphores-that-read-0-binary-se.patch diff --git a/patches/metal2vulkan/0079-Revert-pending-audit-skips-semaphores-that-read-0-bi.patch b/src/patches/metal2vulkan/0079-Revert-pending-audit-skips-semaphores-that-read-0-bi.patch similarity index 100% rename from patches/metal2vulkan/0079-Revert-pending-audit-skips-semaphores-that-read-0-bi.patch rename to src/patches/metal2vulkan/0079-Revert-pending-audit-skips-semaphores-that-read-0-bi.patch diff --git a/patches/metal2vulkan/0080-live-host_mutable-host-transfer-color-images-mutable.patch b/src/patches/metal2vulkan/0080-live-host_mutable-host-transfer-color-images-mutable.patch similarity index 100% rename from patches/metal2vulkan/0080-live-host_mutable-host-transfer-color-images-mutable.patch rename to src/patches/metal2vulkan/0080-live-host_mutable-host-transfer-color-images-mutable.patch diff --git a/patches/metal2vulkan/0081-live-batch_end_light-no-end-barrier-per-batch-in-exa.patch b/src/patches/metal2vulkan/0081-live-batch_end_light-no-end-barrier-per-batch-in-exa.patch similarity index 100% rename from patches/metal2vulkan/0081-live-batch_end_light-no-end-barrier-per-batch-in-exa.patch rename to src/patches/metal2vulkan/0081-live-batch_end_light-no-end-barrier-per-batch-in-exa.patch diff --git a/patches/metal2vulkan/0082-diagnostic-M2V_VIEW_LOG-names-views-kept-apart-from-.patch b/src/patches/metal2vulkan/0082-diagnostic-M2V_VIEW_LOG-names-views-kept-apart-from-.patch similarity index 100% rename from patches/metal2vulkan/0082-diagnostic-M2V_VIEW_LOG-names-views-kept-apart-from-.patch rename to src/patches/metal2vulkan/0082-diagnostic-M2V_VIEW_LOG-names-views-kept-apart-from-.patch diff --git a/patches/metal2vulkan/0083-live-view_render_direct-an-A8Unorm-view-of-an-R8Unor.patch b/src/patches/metal2vulkan/0083-live-view_render_direct-an-A8Unorm-view-of-an-R8Unor.patch similarity index 100% rename from patches/metal2vulkan/0083-live-view_render_direct-an-A8Unorm-view-of-an-R8Unor.patch rename to src/patches/metal2vulkan/0083-live-view_render_direct-an-A8Unorm-view-of-an-R8Unor.patch diff --git a/patches/metal2vulkan/0084-view_render_direct-also-for-reinterpreted-views-a-vi.patch b/src/patches/metal2vulkan/0084-view_render_direct-also-for-reinterpreted-views-a-vi.patch similarity index 100% rename from patches/metal2vulkan/0084-view_render_direct-also-for-reinterpreted-views-a-vi.patch rename to src/patches/metal2vulkan/0084-view_render_direct-also-for-reinterpreted-views-a-vi.patch diff --git a/patches/metal2vulkan/0085-live-inline_lazy-a-lazy-surface-s-passes-record-thei.patch b/src/patches/metal2vulkan/0085-live-inline_lazy-a-lazy-surface-s-passes-record-thei.patch similarity index 100% rename from patches/metal2vulkan/0085-live-inline_lazy-a-lazy-surface-s-passes-record-thei.patch rename to src/patches/metal2vulkan/0085-live-inline_lazy-a-lazy-surface-s-passes-record-thei.patch diff --git a/patches/metal2vulkan/0086-barrier-log-M2V_BARRIER_LOG-and-live-precise_barrier.patch b/src/patches/metal2vulkan/0086-barrier-log-M2V_BARRIER_LOG-and-live-precise_barrier.patch similarity index 100% rename from patches/metal2vulkan/0086-barrier-log-M2V_BARRIER_LOG-and-live-precise_barrier.patch rename to src/patches/metal2vulkan/0086-barrier-log-M2V_BARRIER_LOG-and-live-precise_barrier.patch diff --git a/patches/metal2vulkan/0087-diagnostic-barrier-log-counts-image-to-image-shadow-.patch b/src/patches/metal2vulkan/0087-diagnostic-barrier-log-counts-image-to-image-shadow-.patch similarity index 100% rename from patches/metal2vulkan/0087-diagnostic-barrier-log-counts-image-to-image-shadow-.patch rename to src/patches/metal2vulkan/0087-diagnostic-barrier-log-counts-image-to-image-shadow-.patch diff --git a/patches/metal2vulkan/0088-diagnostic-scheduler-log-M2V_SCHED_LOG-commit-call-i.patch b/src/patches/metal2vulkan/0088-diagnostic-scheduler-log-M2V_SCHED_LOG-commit-call-i.patch similarity index 100% rename from patches/metal2vulkan/0088-diagnostic-scheduler-log-M2V_SCHED_LOG-commit-call-i.patch rename to src/patches/metal2vulkan/0088-diagnostic-scheduler-log-M2V_SCHED_LOG-commit-call-i.patch diff --git a/patches/metal2vulkan/0089-diagnostic-scheduler-log-held-reasons-per-logical-qu.patch b/src/patches/metal2vulkan/0089-diagnostic-scheduler-log-held-reasons-per-logical-qu.patch similarity index 100% rename from patches/metal2vulkan/0089-diagnostic-scheduler-log-held-reasons-per-logical-qu.patch rename to src/patches/metal2vulkan/0089-diagnostic-scheduler-log-held-reasons-per-logical-qu.patch diff --git a/patches/metal2vulkan/0090-live-checks_first-1-a-left-submission-check-runs-bef.patch b/src/patches/metal2vulkan/0090-live-checks_first-1-a-left-submission-check-runs-bef.patch similarity index 100% rename from patches/metal2vulkan/0090-live-checks_first-1-a-left-submission-check-runs-bef.patch rename to src/patches/metal2vulkan/0090-live-checks_first-1-a-left-submission-check-runs-bef.patch diff --git a/patches/metal2vulkan/0091-diagnostic-scheduler-log-a-checked-head-s-landing-an.patch b/src/patches/metal2vulkan/0091-diagnostic-scheduler-log-a-checked-head-s-landing-an.patch similarity index 100% rename from patches/metal2vulkan/0091-diagnostic-scheduler-log-a-checked-head-s-landing-an.patch rename to src/patches/metal2vulkan/0091-diagnostic-scheduler-log-a-checked-head-s-landing-an.patch diff --git a/patches/metal2vulkan/0092-live-inline_checks-1-run-a-batch-s-submission-checks.patch b/src/patches/metal2vulkan/0092-live-inline_checks-1-run-a-batch-s-submission-checks.patch similarity index 100% rename from patches/metal2vulkan/0092-live-inline_checks-1-run-a-batch-s-submission-checks.patch rename to src/patches/metal2vulkan/0092-live-inline_checks-1-run-a-batch-s-submission-checks.patch diff --git a/patches/qemu/0001-the-touch-census-trap-the-guest-CPU-s-fi.patch b/src/patches/qemu/0001-the-touch-census-trap-the-guest-CPU-s-fi.patch similarity index 100% rename from patches/qemu/0001-the-touch-census-trap-the-guest-CPU-s-fi.patch rename to src/patches/qemu/0001-the-touch-census-trap-the-guest-CPU-s-fi.patch diff --git a/patches/qemu/0002-census-kvm-all-include-qemu-units.h.patch b/src/patches/qemu/0002-census-kvm-all-include-qemu-units.h.patch similarity index 100% rename from patches/qemu/0002-census-kvm-all-include-qemu-units.h.patch rename to src/patches/qemu/0002-census-kvm-all-include-qemu-units.h.patch diff --git a/patches/qemu/0003-census-meson-build-census.c-on-any-Linux-host.patch b/src/patches/qemu/0003-census-meson-build-census.c-on-any-Linux-host.patch similarity index 100% rename from patches/qemu/0003-census-meson-build-census.c-on-any-Linux-host.patch rename to src/patches/qemu/0003-census-meson-build-census.c-on-any-Linux-host.patch diff --git a/patches/qemu/0004-coherent-pages-on-the-census-s-KVM-only-.patch b/src/patches/qemu/0004-coherent-pages-on-the-census-s-KVM-only-.patch similarity index 100% rename from patches/qemu/0004-coherent-pages-on-the-census-s-KVM-only-.patch rename to src/patches/qemu/0004-coherent-pages-on-the-census-s-KVM-only-.patch diff --git a/patches/qemu/0005-coherent-a-stale-page-is-no-surface-s-an.patch b/src/patches/qemu/0005-coherent-a-stale-page-is-no-surface-s-an.patch similarity index 100% rename from patches/qemu/0005-coherent-a-stale-page-is-no-surface-s-an.patch rename to src/patches/qemu/0005-coherent-a-stale-page-is-no-surface-s-an.patch diff --git a/patches/qemu/0006-census-a-surface-s-marks-move-in-runs-of-the-view.patch b/src/patches/qemu/0006-census-a-surface-s-marks-move-in-runs-of-the-view.patch similarity index 100% rename from patches/qemu/0006-census-a-surface-s-marks-move-in-runs-of-the-view.patch rename to src/patches/qemu/0006-census-a-surface-s-marks-move-in-runs-of-the-view.patch diff --git a/patches/qemu/0007-census-held-pages-are-read-only-so-a-CPU-store-reach.patch b/src/patches/qemu/0007-census-held-pages-are-read-only-so-a-CPU-store-reach.patch similarity index 100% rename from patches/qemu/0007-census-held-pages-are-read-only-so-a-CPU-store-reach.patch rename to src/patches/qemu/0007-census-held-pages-are-read-only-so-a-CPU-store-reach.patch diff --git a/patches/qemu/0008-census-track-a-Coherent-surface-s-rows-as-ranges-not.patch b/src/patches/qemu/0008-census-track-a-Coherent-surface-s-rows-as-ranges-not.patch similarity index 100% rename from patches/qemu/0008-census-track-a-Coherent-surface-s-rows-as-ranges-not.patch rename to src/patches/qemu/0008-census-track-a-Coherent-surface-s-rows-as-ranges-not.patch diff --git a/patches/qemu/0009-census-QEMU-s-own-small-loads-and-stores-of-guest-RA.patch b/src/patches/qemu/0009-census-QEMU-s-own-small-loads-and-stores-of-guest-RA.patch similarity index 100% rename from patches/qemu/0009-census-QEMU-s-own-small-loads-and-stores-of-guest-RA.patch rename to src/patches/qemu/0009-census-QEMU-s-own-small-loads-and-stores-of-guest-RA.patch diff --git a/patches/qemu/0010-apple-gfx-pci-MSI-through-a-KVM-irqfd-x-irqfd-live-s.patch b/src/patches/qemu/0010-apple-gfx-pci-MSI-through-a-KVM-irqfd-x-irqfd-live-s.patch similarity index 100% rename from patches/qemu/0010-apple-gfx-pci-MSI-through-a-KVM-irqfd-x-irqfd-live-s.patch rename to src/patches/qemu/0010-apple-gfx-pci-MSI-through-a-KVM-irqfd-x-irqfd-live-s.patch diff --git a/patches/qemu/0011-apple-gfx-pci-x-halt-poll-ns-a-live-per-VM-KVM_CAP_H.patch b/src/patches/qemu/0011-apple-gfx-pci-x-halt-poll-ns-a-live-per-VM-KVM_CAP_H.patch similarity index 100% rename from patches/qemu/0011-apple-gfx-pci-x-halt-poll-ns-a-live-per-VM-KVM_CAP_H.patch rename to src/patches/qemu/0011-apple-gfx-pci-x-halt-poll-ns-a-live-per-VM-KVM_CAP_H.patch diff --git a/patches/qemu/0012-apple-gfx-pci-WakeFifo-doorbells-through-KVM-ioevent.patch b/src/patches/qemu/0012-apple-gfx-pci-WakeFifo-doorbells-through-KVM-ioevent.patch similarity index 100% rename from patches/qemu/0012-apple-gfx-pci-WakeFifo-doorbells-through-KVM-ioevent.patch rename to src/patches/qemu/0012-apple-gfx-pci-WakeFifo-doorbells-through-KVM-ioevent.patch diff --git a/patches/qemu/0013-apple-gfx-pci-x-ioeventfd-KVM-always-has-eventfds-he.patch b/src/patches/qemu/0013-apple-gfx-pci-x-ioeventfd-KVM-always-has-eventfds-he.patch similarity index 100% rename from patches/qemu/0013-apple-gfx-pci-x-ioeventfd-KVM-always-has-eventfds-he.patch rename to src/patches/qemu/0013-apple-gfx-pci-x-ioeventfd-KVM-always-has-eventfds-he.patch diff --git a/patches/reims-vgpu/0001-REIMS_VGPU_NON_APPLE_GPU-1-answers-as-an.patch b/src/patches/reims-vgpu/0001-REIMS_VGPU_NON_APPLE_GPU-1-answers-as-an.patch similarity index 100% rename from patches/reims-vgpu/0001-REIMS_VGPU_NON_APPLE_GPU-1-answers-as-an.patch rename to src/patches/reims-vgpu/0001-REIMS_VGPU_NON_APPLE_GPU-1-answers-as-an.patch diff --git a/patches/reims-vgpu/0002-REIMS_VGPU_NON_APPLE_GPU-takes-a-list-of.patch b/src/patches/reims-vgpu/0002-REIMS_VGPU_NON_APPLE_GPU-takes-a-list-of.patch similarity index 100% rename from patches/reims-vgpu/0002-REIMS_VGPU_NON_APPLE_GPU-takes-a-list-of.patch rename to src/patches/reims-vgpu/0002-REIMS_VGPU_NON_APPLE_GPU-takes-a-list-of.patch diff --git a/patches/reims-vgpu/0003-port-the-Vulkan-platform-to-metal2vulkan.patch b/src/patches/reims-vgpu/0003-port-the-Vulkan-platform-to-metal2vulkan.patch similarity index 100% rename from patches/reims-vgpu/0003-port-the-Vulkan-platform-to-metal2vulkan.patch rename to src/patches/reims-vgpu/0003-port-the-Vulkan-platform-to-metal2vulkan.patch diff --git a/patches/reims-vgpu/0004-REIMS_VGPU_VBLANK-1-re-raises-an-idle-di.patch b/src/patches/reims-vgpu/0004-REIMS_VGPU_VBLANK-1-re-raises-an-idle-di.patch similarity index 100% rename from patches/reims-vgpu/0004-REIMS_VGPU_VBLANK-1-re-raises-an-idle-di.patch rename to src/patches/reims-vgpu/0004-REIMS_VGPU_VBLANK-1-re-raises-an-idle-di.patch diff --git a/patches/reims-vgpu/0005-REIMS_VGPU_VBLANK_HZ-sets-the-ticks-rate.patch b/src/patches/reims-vgpu/0005-REIMS_VGPU_VBLANK_HZ-sets-the-ticks-rate.patch similarity index 100% rename from patches/reims-vgpu/0005-REIMS_VGPU_VBLANK_HZ-sets-the-ticks-rate.patch rename to src/patches/reims-vgpu/0005-REIMS_VGPU_VBLANK_HZ-sets-the-ticks-rate.patch diff --git a/patches/reims-vgpu/0006-the-touch-census-s-news-of-surfaces-and-.patch b/src/patches/reims-vgpu/0006-the-touch-census-s-news-of-surfaces-and-.patch similarity index 100% rename from patches/reims-vgpu/0006-the-touch-census-s-news-of-surfaces-and-.patch rename to src/patches/reims-vgpu/0006-the-touch-census-s-news-of-surfaces-and-.patch diff --git a/patches/reims-vgpu/0007-census-the-report-script-and-the-QEMU-fix.patch b/src/patches/reims-vgpu/0007-census-the-report-script-and-the-QEMU-fix.patch similarity index 100% rename from patches/reims-vgpu/0007-census-the-report-script-and-the-QEMU-fix.patch rename to src/patches/reims-vgpu/0007-census-the-report-script-and-the-QEMU-fix.patch diff --git a/patches/reims-vgpu/0008-census-the-guests-of-the-boot-tests-the-C-harness-an.patch b/src/patches/reims-vgpu/0008-census-the-guests-of-the-boot-tests-the-C-harness-an.patch similarity index 100% rename from patches/reims-vgpu/0008-census-the-guests-of-the-boot-tests-the-C-harness-an.patch rename to src/patches/reims-vgpu/0008-census-the-guests-of-the-boot-tests-the-C-harness-an.patch diff --git a/patches/reims-vgpu/0009-tell-the-platform-which-texture-the-disp.patch b/src/patches/reims-vgpu/0009-tell-the-platform-which-texture-the-disp.patch similarity index 100% rename from patches/reims-vgpu/0009-tell-the-platform-which-texture-the-disp.patch rename to src/patches/reims-vgpu/0009-tell-the-platform-which-texture-the-disp.patch diff --git a/patches/reims-vgpu/0010-tick-bits-and-fixed-grid-experiments-log.patch b/src/patches/reims-vgpu/0010-tick-bits-and-fixed-grid-experiments-log.patch similarity index 100% rename from patches/reims-vgpu/0010-tick-bits-and-fixed-grid-experiments-log.patch rename to src/patches/reims-vgpu/0010-tick-bits-and-fixed-grid-experiments-log.patch diff --git a/patches/reims-vgpu/0011-trap-coherent-surfaces-hooks-and-tests.patch b/src/patches/reims-vgpu/0011-trap-coherent-surfaces-hooks-and-tests.patch similarity index 100% rename from patches/reims-vgpu/0011-trap-coherent-surfaces-hooks-and-tests.patch rename to src/patches/reims-vgpu/0011-trap-coherent-surfaces-hooks-and-tests.patch diff --git a/patches/reims-vgpu/0012-REIMS_VGPU_PAGED_BUFFER_CACHE-keeps-page.patch b/src/patches/reims-vgpu/0012-REIMS_VGPU_PAGED_BUFFER_CACHE-keeps-page.patch similarity index 100% rename from patches/reims-vgpu/0012-REIMS_VGPU_PAGED_BUFFER_CACHE-keeps-page.patch rename to src/patches/reims-vgpu/0012-REIMS_VGPU_PAGED_BUFFER_CACHE-keeps-page.patch diff --git a/patches/reims-vgpu/0013-Skip-a-new-Private-texture-s-first-page-up-behind-a-.patch b/src/patches/reims-vgpu/0013-Skip-a-new-Private-texture-s-first-page-up-behind-a-.patch similarity index 100% rename from patches/reims-vgpu/0013-Skip-a-new-Private-texture-s-first-page-up-behind-a-.patch rename to src/patches/reims-vgpu/0013-Skip-a-new-Private-texture-s-first-page-up-behind-a-.patch diff --git a/patches/reims-vgpu/0014-only-a-sink-that-holds-unmaps-is-asked.patch b/src/patches/reims-vgpu/0014-only-a-sink-that-holds-unmaps-is-asked.patch similarity index 100% rename from patches/reims-vgpu/0014-only-a-sink-that-holds-unmaps-is-asked.patch rename to src/patches/reims-vgpu/0014-only-a-sink-that-holds-unmaps-is-asked.patch diff --git a/patches/reims-vgpu/0015-a-boot-test-of-coherent-pages-through-NV.patch b/src/patches/reims-vgpu/0015-a-boot-test-of-coherent-pages-through-NV.patch similarity index 100% rename from patches/reims-vgpu/0015-a-boot-test-of-coherent-pages-through-NV.patch rename to src/patches/reims-vgpu/0015-a-boot-test-of-coherent-pages-through-NV.patch diff --git a/patches/reims-vgpu/0016-the-census-s-costs-per-sync-and-tests-of.patch b/src/patches/reims-vgpu/0016-the-census-s-costs-per-sync-and-tests-of.patch similarity index 100% rename from patches/reims-vgpu/0016-the-census-s-costs-per-sync-and-tests-of.patch rename to src/patches/reims-vgpu/0016-the-census-s-costs-per-sync-and-tests-of.patch diff --git a/patches/reims-vgpu/0017-the-NVMe-boot-test-s-BAR-clear-of-the-Q3.patch b/src/patches/reims-vgpu/0017-the-NVMe-boot-test-s-BAR-clear-of-the-Q3.patch similarity index 100% rename from patches/reims-vgpu/0017-the-NVMe-boot-test-s-BAR-clear-of-the-Q3.patch rename to src/patches/reims-vgpu/0017-the-NVMe-boot-test-s-BAR-clear-of-the-Q3.patch diff --git a/patches/reims-vgpu/0018-the-census-report-reads-a-build-before-t.patch b/src/patches/reims-vgpu/0018-the-census-report-reads-a-build-before-t.patch similarity index 100% rename from patches/reims-vgpu/0018-the-census-report-reads-a-build-before-t.patch rename to src/patches/reims-vgpu/0018-the-census-report-reads-a-build-before-t.patch diff --git a/patches/reims-vgpu/0019-coherent-hooks-for-the-read-only-held-pages-qemu-55c.patch b/src/patches/reims-vgpu/0019-coherent-hooks-for-the-read-only-held-pages-qemu-55c.patch similarity index 100% rename from patches/reims-vgpu/0019-coherent-hooks-for-the-read-only-held-pages-qemu-55c.patch rename to src/patches/reims-vgpu/0019-coherent-hooks-for-the-read-only-held-pages-qemu-55c.patch diff --git a/patches/reims-vgpu/0020-census-readback-a-content-check-on-a-guest.patch b/src/patches/reims-vgpu/0020-census-readback-a-content-check-on-a-guest.patch similarity index 100% rename from patches/reims-vgpu/0020-census-readback-a-content-check-on-a-guest.patch rename to src/patches/reims-vgpu/0020-census-readback-a-content-check-on-a-guest.patch diff --git a/patches/reims-vgpu/0021-census-failing-tests-for-a-surface-page-outside-the-.patch b/src/patches/reims-vgpu/0021-census-failing-tests-for-a-surface-page-outside-the-.patch similarity index 100% rename from patches/reims-vgpu/0021-census-failing-tests-for-a-surface-page-outside-the-.patch rename to src/patches/reims-vgpu/0021-census-failing-tests-for-a-surface-page-outside-the-.patch diff --git a/patches/reims-vgpu/0022-Coherent-tell-trapping-surfaces-of-host-reads-and-wr.patch b/src/patches/reims-vgpu/0022-Coherent-tell-trapping-surfaces-of-host-reads-and-wr.patch similarity index 100% rename from patches/reims-vgpu/0022-Coherent-tell-trapping-surfaces-of-host-reads-and-wr.patch rename to src/patches/reims-vgpu/0022-Coherent-tell-trapping-surfaces-of-host-reads-and-wr.patch diff --git a/patches/reims-vgpu/0023-Coherent-a-CPU-write-through-a-surface-s-own-mapping.patch b/src/patches/reims-vgpu/0023-Coherent-a-CPU-write-through-a-surface-s-own-mapping.patch similarity index 100% rename from patches/reims-vgpu/0023-Coherent-a-CPU-write-through-a-surface-s-own-mapping.patch rename to src/patches/reims-vgpu/0023-Coherent-a-CPU-write-through-a-surface-s-own-mapping.patch diff --git a/patches/reims-vgpu/0024-census-probes-autoreleasepool-per-frame-in-probe_lon.patch b/src/patches/reims-vgpu/0024-census-probes-autoreleasepool-per-frame-in-probe_lon.patch similarity index 100% rename from patches/reims-vgpu/0024-census-probes-autoreleasepool-per-frame-in-probe_lon.patch rename to src/patches/reims-vgpu/0024-census-probes-autoreleasepool-per-frame-in-probe_lon.patch diff --git a/patches/reims-vgpu/0025-new-Let-a-VM-s-settings-turn-video-acceleration-off.patch b/src/patches/reims-vgpu/0025-new-Let-a-VM-s-settings-turn-video-acceleration-off.patch similarity index 100% rename from patches/reims-vgpu/0025-new-Let-a-VM-s-settings-turn-video-acceleration-off.patch rename to src/patches/reims-vgpu/0025-new-Let-a-VM-s-settings-turn-video-acceleration-off.patch diff --git a/patches/reims-vgpu/0026-pipelined-ExecIndirect3-on-a-FIFO-prototype-off-unle.patch b/src/patches/reims-vgpu/0026-pipelined-ExecIndirect3-on-a-FIFO-prototype-off-unle.patch similarity index 100% rename from patches/reims-vgpu/0026-pipelined-ExecIndirect3-on-a-FIFO-prototype-off-unle.patch rename to src/patches/reims-vgpu/0026-pipelined-ExecIndirect3-on-a-FIFO-prototype-off-unle.patch diff --git a/patches/reims-vgpu/0027-REIMS_VGPU_GROUPED-1-boot-switch-for-grouped-complet.patch b/src/patches/reims-vgpu/0027-REIMS_VGPU_GROUPED-1-boot-switch-for-grouped-complet.patch similarity index 100% rename from patches/reims-vgpu/0027-REIMS_VGPU_GROUPED-1-boot-switch-for-grouped-complet.patch rename to src/patches/reims-vgpu/0027-REIMS_VGPU_GROUPED-1-boot-switch-for-grouped-complet.patch diff --git a/patches/reims-vgpu/0028-interrupt-moderation-off-unless-REIMS_VGPU_IRQ_MODER.patch b/src/patches/reims-vgpu/0028-interrupt-moderation-off-unless-REIMS_VGPU_IRQ_MODER.patch similarity index 100% rename from patches/reims-vgpu/0028-interrupt-moderation-off-unless-REIMS_VGPU_IRQ_MODER.patch rename to src/patches/reims-vgpu/0028-interrupt-moderation-off-unless-REIMS_VGPU_IRQ_MODER.patch diff --git a/patches/reims-vgpu/0029-Integrate-guarded-render-lowering-and-multi-queue-re.patch b/src/patches/reims-vgpu/0029-Integrate-guarded-render-lowering-and-multi-queue-re.patch similarity index 100% rename from patches/reims-vgpu/0029-Integrate-guarded-render-lowering-and-multi-queue-re.patch rename to src/patches/reims-vgpu/0029-Integrate-guarded-render-lowering-and-multi-queue-re.patch diff --git a/patches/reims-vgpu/0030-REIMS_VGPU_PAGED_BUFFER_BY_PAGES-1-finds-kept-paged-.patch b/src/patches/reims-vgpu/0030-REIMS_VGPU_PAGED_BUFFER_BY_PAGES-1-finds-kept-paged-.patch similarity index 100% rename from patches/reims-vgpu/0030-REIMS_VGPU_PAGED_BUFFER_BY_PAGES-1-finds-kept-paged-.patch rename to src/patches/reims-vgpu/0030-REIMS_VGPU_PAGED_BUFFER_BY_PAGES-1-finds-kept-paged-.patch diff --git a/patches/reims-vgpu/0031-staged-page-ups-a-new-texture-s-first-page-up-copies.patch b/src/patches/reims-vgpu/0031-staged-page-ups-a-new-texture-s-first-page-up-copies.patch similarity index 100% rename from patches/reims-vgpu/0031-staged-page-ups-a-new-texture-s-first-page-up-copies.patch rename to src/patches/reims-vgpu/0031-staged-page-ups-a-new-texture-s-first-page-up-copies.patch diff --git a/patches/reims-vgpu/0032-staged-zero-page-ups-a-texture-s-first-prepare-over-.patch b/src/patches/reims-vgpu/0032-staged-zero-page-ups-a-texture-s-first-prepare-over-.patch similarity index 100% rename from patches/reims-vgpu/0032-staged-zero-page-ups-a-texture-s-first-prepare-over-.patch rename to src/patches/reims-vgpu/0032-staged-zero-page-ups-a-texture-s-first-prepare-over-.patch diff --git a/patches/reims-vgpu/0033-staged-page-ups-read-guest-pages-with-one-memcpy-per.patch b/src/patches/reims-vgpu/0033-staged-page-ups-read-guest-pages-with-one-memcpy-per.patch similarity index 100% rename from patches/reims-vgpu/0033-staged-page-ups-read-guest-pages-with-one-memcpy-per.patch rename to src/patches/reims-vgpu/0033-staged-page-ups-read-guest-pages-with-one-memcpy-per.patch diff --git a/sims/bin/android-gpu-desktop b/src/sims/bin/android-gpu-desktop similarity index 100% rename from sims/bin/android-gpu-desktop rename to src/sims/bin/android-gpu-desktop diff --git a/sims/bin/android-sim b/src/sims/bin/android-sim similarity index 100% rename from sims/bin/android-sim rename to src/sims/bin/android-sim diff --git a/sims/bin/mac-sim b/src/sims/bin/mac-sim similarity index 100% rename from sims/bin/mac-sim rename to src/sims/bin/mac-sim diff --git a/sims/bin/mac-sim-remote b/src/sims/bin/mac-sim-remote similarity index 100% rename from sims/bin/mac-sim-remote rename to src/sims/bin/mac-sim-remote diff --git a/sims/bin/sim-fps b/src/sims/bin/sim-fps similarity index 100% rename from sims/bin/sim-fps rename to src/sims/bin/sim-fps diff --git a/sims/systemd/android-gpu-desktop.service b/src/sims/systemd/android-gpu-desktop.service similarity index 100% rename from sims/systemd/android-gpu-desktop.service rename to src/sims/systemd/android-gpu-desktop.service diff --git a/sims/systemd/mac-sim-idle.service b/src/sims/systemd/mac-sim-idle.service similarity index 100% rename from sims/systemd/mac-sim-idle.service rename to src/sims/systemd/mac-sim-idle.service diff --git a/sims/systemd/mac-sim-idle.timer b/src/sims/systemd/mac-sim-idle.timer similarity index 100% rename from sims/systemd/mac-sim-idle.timer rename to src/sims/systemd/mac-sim-idle.timer diff --git a/skills/macbox/SKILL.md b/src/skills/macbox/SKILL.md similarity index 100% rename from skills/macbox/SKILL.md rename to src/skills/macbox/SKILL.md diff --git a/skills/phone-builds/SKILL.md b/src/skills/phone-builds/SKILL.md similarity index 100% rename from skills/phone-builds/SKILL.md rename to src/skills/phone-builds/SKILL.md diff --git a/skills/phone-builds/bin/phone-build b/src/skills/phone-builds/bin/phone-build similarity index 100% rename from skills/phone-builds/bin/phone-build rename to src/skills/phone-builds/bin/phone-build diff --git a/skills/simulators/SKILL.md b/src/skills/simulators/SKILL.md similarity index 100% rename from skills/simulators/SKILL.md rename to src/skills/simulators/SKILL.md diff --git a/skills/simulators/references/android.md b/src/skills/simulators/references/android.md similarity index 97% rename from skills/simulators/references/android.md rename to src/skills/simulators/references/android.md index fff034a..bbba6be 100644 --- a/skills/simulators/references/android.md +++ b/src/skills/simulators/references/android.md @@ -71,6 +71,6 @@ The user watches emulators in T3 Code's Device panel. After `android-sim up` or ## Files -- The commands are `sims/bin/android-sim` and `sims/bin/android-gpu-desktop` in the macbox checkout (linked into `~/.local/bin` by `macbox agents install`), with the unit `android-gpu-desktop.service`. +- The commands are `src/sims/bin/android-sim` and `src/sims/bin/android-gpu-desktop` in the macbox checkout (linked into `~/.local/bin` by `macbox agents install`), with the unit `android-gpu-desktop.service`. - The SDK is in `ANDROID_HOME`, Gradle's cache in `GRADLE_USER_HOME` (default `~/.gradle`), the emulators in `ANDROID_AVD_HOME` (default `~/.android/avd`; elsewhere, `setup` leaves pointer files in `~/.android/avd/` so T3 Code finds them). - Logs and state are in `~/.local/state/android-sim//`, claims in `~/.local/state/android-sim/claims/`. Each emulator runs as the transient user unit `android-sim-emulator-` on its own port (5570, 5572, ...), away from the ports T3 Code takes from 5554 up. diff --git a/skills/simulators/references/ios.md b/src/skills/simulators/references/ios.md similarity index 97% rename from skills/simulators/references/ios.md rename to src/skills/simulators/references/ios.md index b736228..b19625c 100644 --- a/skills/simulators/references/ios.md +++ b/src/skills/simulators/references/ios.md @@ -98,7 +98,7 @@ You run on the same machine as the Mac, so the stream in T3 doesn't matter to yo ## Files -- The command is `sims/bin/mac-sim` in the macbox checkout (linked as `~/.local/bin/mac-sim` by `macbox agents install`). `sims/bin/mac-sim-remote` is its Mac side, copied to the Mac's `~/.local/lib/mac-sim/` when it changes; it installs a pinned `agent-device` there on first use (`mac-sim setup` does it ahead of time). +- The command is `src/sims/bin/mac-sim` in the macbox checkout (linked as `~/.local/bin/mac-sim` by `macbox agents install`). `src/sims/bin/mac-sim-remote` is its Mac side, copied to the Mac's `~/.local/lib/mac-sim/` when it changes; it installs a pinned `agent-device` there on first use (`mac-sim setup` does it ahead of time). - Claims, logs, the shared SSH connection, the pool's UDIDs (`pool.cache`) and each simulator's `last-used`/`last-viewed` marks are in `~/.local/state/macbox/mac-sim/`. - Metro and its tunnel run as transient user units `macbox-sim-metro-` and `macbox-sim-tunnel-`, Metro on port 8101 + 2 × the simulator's place in the pool (`MAC_SIM_METRO_BASE`). - The idle check is `mac-sim idle [--dry-run] [name...]`, run by `~/.config/systemd/user/mac-sim-idle.{timer,service}`. diff --git a/skills/simulators/references/verify.md b/src/skills/simulators/references/verify.md similarity index 100% rename from skills/simulators/references/verify.md rename to src/skills/simulators/references/verify.md diff --git a/versions.env b/src/versions.env similarity index 75% rename from versions.env rename to src/versions.env index 06988b2..f478d42 100644 --- a/versions.env +++ b/src/versions.env @@ -1,7 +1,7 @@ # Pinned sources for `macbox build`. With the patches in patches/ they make the build that has run day # to day since 2026-11-09 on an Intel Arrow Lake iGPU (Core Ultra 200S, Mesa 26.2.4 ANV), "production I": -# Reims vGPU 7198fe6 + patches/reims-vgpu, its QEMU at bd95509 + patches/qemu, and metal2vulkan's -# development branch at 0db5825a + patches/metal2vulkan. `macbox build --upstream` takes Reims's +# Reims vGPU 7198fe6 + src/patches/reims-vgpu, its QEMU at bd95509 + src/patches/qemu, and metal2vulkan's +# development branch at 0db5825a + src/patches/metal2vulkan. `macbox build --upstream` takes Reims's # master instead, with no patches. REIMS_REPO=https://github.com/steelbrain/reims-vgpu REIMS_REF=7198fe60c9df14593e86d090cb4640c3e45ac65b