[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-114669":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":15,"forks30d":15,"starsTrendScore":19,"compositeScore":20,"rankGlobal":9,"rankLanguage":9,"license":21,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":22,"hasPages":22,"topics":24,"createdAt":9,"pushedAt":25,"updatedAt":26,"readmeContent":27,"aiSummary":28,"trendingCount":15,"starSnapshotCount":15,"syncStatus":29,"lastSyncTime":30,"discoverSource":31},114669,"crate-ios","oneamendez\u002Fcrate-ios","oneamendez","crate: run Linux VMs on iPhone and iPad",null,"Swift",500,28,1,7,0,10,110,291,46,94.34,"Mozilla Public License 2.0",false,"main",[],"2026-11-16 00:25:14","2026-11-23 16:24:56","\u003Cp align=\"center\">\n  \u003Cimg src=\"docs\u002Fmedia\u002Ficon.png\" width=\"128\" height=\"128\" alt=\"crate's icon: an open wooden crate holding three app windows\">\n\u003C\u002Fp>\n\n\u003Ch1 align=\"center\">crate\u003C\u002Fh1>\n\n\u003Cp align=\"center\">\u003Cb>C\u003C\u002Fb>ompact \u003Cb>R\u003C\u002Fb>untime for \u003Cb>A\u003C\u002Fb>rm64 \u003Cb>T\u003C\u002Fb>ranslation and \u003Cb>E\u003C\u002Fb>mulation\u003C\u002Fp>\n\n\u003Cp align=\"center\">Full Linux distributions, desktop and all, running in virtual machines on your iPhone and iPad, entirely on the device.\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"docs\u002Fmedia\u002Fdesktop.png\" width=\"80%\" alt=\"Ubuntu's GNOME desktop with a terminal open, landscape on an iPhone Duo\">\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\u003Ci>Ubuntu with GNOME, landscape on an iPhone Duo.\u003C\u002Fi>\u003C\u002Fp>\n\n## Why crate\n\n- **A real computer in your pocket.** Not a remote desktop or a cloud VM:\n  the whole operating system runs on the iPhone, works offline, and your files\n  stay on it.\n- **Real distributions.** Stock arm64 Linux with its own package manager, so\n  the software you'd run on an Arm laptop or server installs as it is: a\n  browser, developer tools, coding agents like Claude Code, CAD apps.\n- **Built for speed.** We built crate to be fast, from the engine up. The\n  [crate engine](https:\u002F\u002Fgithub.com\u002Foneamendez\u002Fcrate) is written from scratch\n  in Rust: an arm64-to-arm64 translator that copies most guest instructions\n  into host code as they are and rewrites only what touches the machine. On a\n  Mac, a benchmark pass that takes QEMU's TCG 130.5 s takes crate 24.5 s; the\n  rest of the timings, the iPhone's included, are in the engine's\n  [benchmarks](https:\u002F\u002Fgithub.com\u002Foneamendez\u002Fcrate#benchmarks).\n- **GPU-accelerated.** The guest's OpenGL runs on the iPhone's GPU, through\n  virglrenderer, ANGLE and MoltenVK: desktops composite in hardware, and 3D\n  apps render on it.\n- **Made for the phone.** Touch is a tablet, a key row above the keyboard adds\n  Esc, Ctrl, Super, Tab, function keys and arrows, the desktop follows the\n  phone as it turns or folds, and iPhone Duo gets layouts of its own.\n\n## What it runs\n\nLinux comes first. From the Install tab, each with an account of your own:\n\n| Distribution | Desktop |\n|---|---|\n| Ubuntu 26.04 LTS | GNOME, the heaviest of them, and it runs |\n| Debian 13 | KDE Plasma or Xfce |\n| Arch Linux ARM | KDE Plasma or Xfce |\n\nComing soon: Omarchy with Hyprland (it runs, with bugs left to fix), custom\nLinux images of your own, and other operating systems.\n\n## Features\n\n- Ubuntu, Debian and Arch Linux ARM from a catalog, each with an account of your own\n- A disk size of your choice at install, and a memory limit you can change later\n- GPU-accelerated desktops: the guest's OpenGL runs on the iPhone's GPU\n- Touch as a tablet, a hardware keyboard, or the on-screen one with a key row\n  for Esc, Ctrl, Super, Tab, function keys and arrows\n- Supports a mouse or trackpad on iPad: wheel scrolling, right and middle click\n- An external monitor as the VM's screen, at the monitor's resolution, with the\n  iPhone or iPad as its trackpad (GNOME may need its resolution set by hand; see\n  [Known issues](#known-issues))\n- iPhone Duo layouts that follow the fold\n- The VM's serial console, a tab away from its desktop\n- JIT from crate's built-in StikJIT, or from StikDebug\n- Logs to share for bug reports, kept across a crash, with memory tracking\n\n## Install\n\ncrate needs JIT, which iOS gives only to an app a debugger has attached to, so\nit can't come from the App Store. Each\n[release](https:\u002F\u002Fgithub.com\u002Foneamendez\u002Fcrate-ios\u002Freleases) has an unsigned\nIPA instead, which you sign with your own Apple account and install from a Mac;\nJIT is then turned on by crate's built-in StikJIT or by StikDebug (see\n[JIT](#jit)). [INSTALL.md](INSTALL.md) has the steps, and a request to paste\ninto Claude Code, which does them for you. crate is developed on an iPhone Duo\nwith iOS 27.1.\n\n## Gallery\n\n\u003Ctable>\n  \u003Ctr>\n    \u003Ctd align=\"center\" width=\"33%\">\n      \u003Cimg src=\"docs\u002Fmedia\u002Fsolidcraft.png\" alt=\"SolidCraft, a 3D CAD app, with a chair model, beside a terminal where Claude Code describes the chair, in Ubuntu's GNOME desktop on an iPhone Duo\">\u003Cbr>\n      \u003Csub>Claude Code, running in the VM, builds a chair in SolidCraft, a 3D CAD app, on Ubuntu with GNOME.\u003C\u002Fsub>\n    \u003C\u002Ftd>\n    \u003Ctd align=\"center\" width=\"33%\">\n      \u003Cimg src=\"docs\u002Fmedia\u002Fchrome-gpu.png\" alt=\"Chrome's chrome:\u002F\u002Fgpu page listing canvas, compositing, rasterization, video decode, WebGL and WebGPU as hardware accelerated\">\u003Cbr>\n      \u003Csub>Chrome with GPU acceleration: chrome:\u002F\u002Fgpu shows canvas, compositing, WebGL and WebGPU on the iPhone's GPU.\u003C\u002Fsub>\n    \u003C\u002Ftd>\n    \u003Ctd align=\"center\" width=\"33%\">\n      \u003Cimg src=\"docs\u002Fmedia\u002Fdisplay-settings.png\" alt=\"GNOME's Displays settings in the VM, with the resolution set to 1280 by 800\">\u003Cbr>\n      \u003Csub>The VM sets its own resolution: 1280 × 800 fits more on screen than the default.\u003C\u002Fsub>\n    \u003C\u002Ftd>\n  \u003C\u002Ftr>\n  \u003Ctr>\n    \u003Ctd align=\"center\" width=\"33%\">\n      \u003Cimg src=\"docs\u002Fmedia\u002Fkde.png\" alt=\"KDE Plasma's desktop with its application menu open, showing Firefox, System Settings and Dolphin, on an iPhone Duo\">\u003Cbr>\n      \u003Csub>Arch Linux ARM with KDE Plasma, its application menu open.\u003C\u002Fsub>\n    \u003C\u002Ftd>\n    \u003Ctd align=\"center\" width=\"33%\">\n      \u003Cimg src=\"docs\u002Fmedia\u002Fmonitor.png\" alt=\"Ubuntu's GNOME desktop filling an external monitor, with an iPhone Duo below it showing crate's trackpad\">\u003Cbr>\n      \u003Csub>An external monitor as the VM's screen: Ubuntu fills the monitor, and the iPhone Duo becomes its trackpad.\u003C\u002Fsub>\n    \u003C\u002Ftd>\n  \u003C\u002Ftr>\n\u003C\u002Ftable>\n\n## Roadmap\n\nSpeed comes first. Every VM runs on the\n[crate engine](https:\u002F\u002Fgithub.com\u002Foneamendez\u002Fcrate), so the engine's speed is\nthe whole app's speed, and that's where help counts most: contributions to the\nengine go to its repository.\n\n1. **Speed.** Faster translation, startup and graphics in the engine, measured\n   by real benchmarks: timings of what people actually do, such as booting to a\n   desktop, opening apps and building code, on the iPhone itself, so every\n   change shows what it gains. Today's numbers are in the engine's\n   [benchmarks](https:\u002F\u002Fgithub.com\u002Foneamendez\u002Fcrate#benchmarks).\n2. **Monitors and devices.** An external monitor already works as the VM's\n   screen. Next, the keyboards, mice, game controllers, cameras, microphones,\n   USB storage and other devices iOS lets an app reach, passed through to the\n   VM; the other way, the VM's sound, clipboard and files reaching iOS.\n3. **More systems.** Omarchy back in the catalog once its bugs are fixed,\n   custom Linux images of your own, then other operating systems.\n\n## The app\n\nAn iOS app that runs Linux VMs on the crate engine: JIT, installing a VM,\nand booting it to its desktop. A few UI stand-ins remain (search the code for\n`STUB`, `SAMPLE DATA` and `PLACEHOLDER`).\n\nThree tabs:\n\n- **Home**: the installed VMs, one large card each, with the screen each was\n  showing when last stopped (`preview.jpg` in its folder) and Start. A card's\n  menu has the VM's settings (on iPhone Duo) and Delete.\n- **Install Vms**: the images the catalog lists, a memory limit, and Install,\n  which asks for the account to make in the VM.\n- **Settings**: JIT, memory, logs, and Acknowledgements: the licenses of\n  crate and of everything it carries.\n\n## JIT\n\ncrate claims its code region at launch, or once a debugger arrives: mapped\nexecutable, authorized by the debugger on `brk #0x69` (StikDebug's legacy.js\nconvention), then mapped again for writing, and test-run. Two ways to get the\ndebugger, picked in Settings:\n\n- **StikDebug**: crate opens `stikdebug:\u002F\u002Fenable-jit` with its pid and\n  legacy.js; StikDebug attaches and comes back.\n- **Built-in StikJIT**: a helper extension (`Sources\u002FJITHelper`) runs\n  [StikJIT](https:\u002F\u002Fgithub.com\u002FStikDebug\u002FStikJIT) (MPL-2.0) through\n  LocalDevVPN's tunnel. Set Up JIT pairs the iPhone with crate itself on iOS 27\n  (or takes a pairing file), with [idevice](https:\u002F\u002Fgithub.com\u002Fjkcoxson\u002Fidevice)\n  (MIT), built from source with one patch (`Scripts\u002Fpatches`).\n\nEach launch logs its JIT steps to `Library\u002FCaches\u002Fcrate.log`, and pairing's\nmessages to `Library\u002FCaches\u002Fidevice.log`.\n\n## The engine\n\n[crate](https:\u002F\u002Fgithub.com\u002Foneamendez\u002Fcrate) runs the VM in this process, on the\ncode region JIT claimed. The VM screen switches between its display (a virtio\nGPU, frames handed straight to the app, touch and keys as a virtio tablet and\nkeyboard) and its serial console in a terminal\n([SwiftTerm](https:\u002F\u002Fgithub.com\u002Fmigueldeicaza\u002FSwiftTerm), MIT). On an iPhone the\nGPU does 3D: the guest's OpenGL runs on the iPhone's GPU through virglrenderer,\nANGLE and MoltenVK, each built from upstream source (see\n[docs\u002FPROVENANCE.md](docs\u002FPROVENANCE.md)); in the Simulator the guest draws in\nsoftware. The network is\nuser-mode, through [libslirp](https:\u002F\u002Fgitlab.freedesktop.org\u002Fslirp\u002Flibslirp)\n(BSD-3-Clause) and [GLib](https:\u002F\u002Fgitlab.gnome.org\u002FGNOME\u002Fglib) (LGPL-2.1-or-later),\nbuilt from source as dynamic frameworks the app embeds.\n\n## VM images\n\nThe images come from\n[arm64-desktop-images](https:\u002F\u002Fgithub.com\u002Foneamendez\u002Farm64-desktop-images),\nwhose GitHub workflow builds and attests them: Ubuntu with GNOME, Debian with\nKDE Plasma or Xfce, and Arch Linux ARM with KDE Plasma or Xfce. Each release has a `catalog.json`\nlisting every image's kernel, initrd and disk (xz, in parts under 2 GiB) with\ntheir SHA-256s, its kernel command line, and its cloud-init vendor-data.\n\nInstall reads the latest catalog, downloads an image (crate must stay open\nmeanwhile), checks every file, unpacks the disk through Apple's xz decoder as\nits parts arrive (sparsely: empty space takes no room) and grows it to 32 GB.\nThe account comes from a seed disk crate writes beside it (`seed.img`, FAT,\nlabelled CIDATA): cloud-init's NoCloud user-data with the user, a SHA-512\ncrypt of the password, the hostname and time zone, plus the image's\nvendor-data (its desktop's autologin). The seed stays attached read-only, so\ncloud-init sets the VM up once. A VM's files are in\n`Library\u002FApplication Support\u002FVMs\u002F\u003Cits ID>\u002F`.\n\nA VM can still be put on the iPhone by hand: copy `vmlinuz`, `initrd.img` and\n`disk.img` into its folder with `devicectl device copy to ... --user mobile`\n(without it crate can't write to the disk; never add\n`--remove-existing-content`, which empties the app's whole container). It\nboots with aTerm's command line.\n\nDebug builds can be driven from a Mac the same way: while a VM runs, an empty\n`Library\u002FCaches\u002Fdebug\u002Fscreen` gets its display saved as `screen.png` there,\n`debug\u002Fcommand.txt` is typed into its console, and `debug\u002Fsize.txt` (\"WxH\" in\npoints) resizes its desktop as rotating or folding the iPhone would. Launched with\n`CRATE_GL_DEBUG=1` (`devicectl device process launch -e`), crate logs ANGLE's\nown GL messages; with `CRATE_LOG=debug`, its debug lines.\n\n## Build\n\nThe libraries go into `Frameworks\u002F`, which isn't committed. Fetch them, each\npinned to a release and checked against its SHA-256:\n\n    .\u002FScripts\u002Ffetch-frameworks.sh  # idevice, libslirp and GLib, the GPU stack\n    .\u002FScripts\u002Ffetch-stikjit.sh     # StikJIT 2.0.1\n    .\u002FScripts\u002Ffetch-crate.sh       # crate v0.1.1\n    xcodegen generate\n    open Crate.xcodeproj\n\nor for the Simulator:\n\n    xcodebuild -project Crate.xcodeproj -scheme Crate \\\n        -destination 'generic\u002Fplatform=iOS Simulator' -derivedDataPath build build\n\nLaunch arguments show one state without tapping to it:\n\n    xcrun simctl launch booted com.amendez.crate --tab=install --jit=on\n    # --tab=home|install|settings  --jit=on|off  --empty  --samples\n    # --rail: the open Duo's tab column, on any device\n\nWith `--jit=on` the Simulator has no code region, so starting a VM pretends: its\nscreenshot becomes the display, and the console shows a login prompt that\nechoes typing.\n\n`VERIFY_ATTESTATION=1` makes the crate and frameworks fetches also check, with\ngh, that each release's own workflow built it. To change crate and the app at\nonce, build crate from a checkout instead of fetching it:\n\n    .\u002FScripts\u002Fbuild-crate.sh       # crate from ~\u002FRepos\u002Fcrate (CRATE_DIR); needs Rust\n\nThe frameworks release is these scripts' output; build them to change one, and\npublish a new release with `.\u002FScripts\u002Frelease-frameworks.sh TAG`, then pin the\n`VERSION` and `SHA256` it prints in `fetch-frameworks.sh`:\n\n    .\u002FScripts\u002Fbuild-idevice.sh     # idevice v0.1.68 from source; needs Rust\n    .\u002FScripts\u002Fbuild-slirp.sh       # libslirp 4.9.7 and GLib 2.90.1; needs meson\n    .\u002FScripts\u002Fbuild-moltenvk.sh    # MoltenVK 1.4.2; about 15 minutes\n    .\u002FScripts\u002Fbuild-angle.sh       # ANGLE; a 4 GB checkout, ANGLE_SRC reuses one\n    .\u002FScripts\u002Fbuild-virgl.sh       # libepoxy 1.5.10 and virglrenderer 1.3.0; needs PyYAML\n\nOnce this repository is public, the `frameworks` workflow, run by hand, does\nthe same on GitHub: it builds them all, publishes the release with an\nattestation, and shows the lines to pin. While the repository is private it\nskips itself.\n\n### IPA\n\nThe `ipa` workflow builds an unsigned IPA from the same pinned libraries: run\nby hand it's a workflow artifact, and a version tag (`vX.Y`) makes it a release.\n`.\u002FScripts\u002Fbuild-ipa.sh` builds the same IPA on a Mac. `Scripts\u002Fsign-ipa.sh`\nsigns it with your own certificate and profiles under your bundle ID, as\n[INSTALL.md](INSTALL.md) describes, and can install it:\n\n    BUNDLE_ID=com.you.crate .\u002FScripts\u002Fsign-ipa.sh crate-unsigned.ipa                # crate-signed.ipa beside it\n    BUNDLE_ID=com.you.crate .\u002FScripts\u002Fsign-ipa.sh crate-unsigned.ipa --install UDID\n\nBoth bundles get `get-task-allow`, which turning JIT on needs, and the app the\ntwo memory entitlements when its profile grants them. Unset, `BUNDLE_ID` is\nthis project's own, `com.amendez.crate`.\n\n## Known issues\n\n- **A guest can't update its own kernel.** crate boots a VM's kernel and\n  initrd from outside its disk, so the images hold their kernel packages at\n  the version they shipped with. A kernel the guest installs anyway is never\n  booted, and an upgrade can remove the modules the booted kernel needs.\n- **Xfce's wallpaper doesn't follow a new screen size.** When the desktop\n  changes size, on an external monitor for one, Xfce's panel, icons and windows\n  follow it, but the wallpaper keeps its old size.\n- **GNOME may not resize to fit a monitor.** If Ubuntu's desktop doesn't fill\n  an external monitor, open Settings → Displays inside the VM and pick a\n  resolution with the monitor's aspect ratio, such as 1920 × 1080 for a 16:9\n  monitor.\n\n## License\n\ncrate's own code is [MPL-2.0](LICENSE), like the\n[crate engine](https:\u002F\u002Fgithub.com\u002Foneamendez\u002Fcrate): changes to crate's files\nstay open, and it can be combined with code under other licenses. What the app\ncarries from other projects keeps its own license:\n[StikJIT](https:\u002F\u002Fgithub.com\u002FStikDebug\u002FStikJIT) (MPL-2.0),\n[idevice](https:\u002F\u002Fgithub.com\u002Fjkcoxson\u002Fidevice) and\n[SwiftTerm](https:\u002F\u002Fgithub.com\u002Fmigueldeicaza\u002FSwiftTerm) (MIT),\n[libslirp](https:\u002F\u002Fgitlab.freedesktop.org\u002Fslirp\u002Flibslirp) (BSD-3-Clause),\n[GLib](https:\u002F\u002Fgitlab.gnome.org\u002FGNOME\u002Fglib) (LGPL-2.1-or-later, kept as its own\nreplaceable framework), [MoltenVK](https:\u002F\u002Fgithub.com\u002FKhronosGroup\u002FMoltenVK)\n(Apache-2.0), [ANGLE](https:\u002F\u002Fchromium.googlesource.com\u002Fangle\u002Fangle)\n(BSD-3-Clause), [libepoxy](https:\u002F\u002Fgithub.com\u002Fanholt\u002Flibepoxy) and\n[virglrenderer](https:\u002F\u002Fgitlab.freedesktop.org\u002Fvirgl\u002Fvirglrenderer) (MIT), and\nwhat they in turn are built from. [docs\u002FPROVENANCE.md](docs\u002FPROVENANCE.md) says\nwhere each comes from and how it's built, and\n[THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md) has every license's text\n(`Scripts\u002Fthird-party-notices.py` writes it). JIT is turned on with\n[StikDebug](https:\u002F\u002Fgithub.com\u002FStikDebug\u002FStikDebug)'s convention, and the VM\nimages are each distribution's own, under their licenses.\n","crate 是一款在 iPhone 和 iPad 上本地运行 Linux 虚拟机的 iOS 应用，无需网络或远程服务器。它基于自研 Rust 编写的 arm64-to-arm64 动态二进制翻译引擎，支持 Ubuntu、Debian、Arch Linux ARM 等完整发行版，提供 GPU 加速（通过 virglrenderer\u002FANGLE\u002FMoltenVK）的桌面环境（如 GNOME、KDE），并深度适配移动交互（触控板、外接显示器、折叠屏布局）。适用于离线开发、嵌入式学习、Linux 桌面轻量使用及 Arm 架构实验等场景。",2,"2026-11-24 04:49:21","CREATED_QUERY"]