r/EmulationOniOS • • 17d ago

Gameplay / Showcase crate: unbox a new way to run Linux on iPhone, powered by Rust

Hey everyone! I built crate (Compact Runtime for Arm64 Translation and Emulation), a free and open-source app that runs full Linux desktops in virtual machines right on your iPhone. The video is Ubuntu with GNOME on my iPhone Duo.

Before this, the best I'd found was UTM with JIT, but Ubuntu was unusable there unless you ran it headless or with Xfce. I wrote crate's engine from scratch in Rust with speed as the main goal, and it's about 5x faster than QEMU's JIT, the engine UTM uses, in my benchmarks.

Runs today: Ubuntu (GNOME), Debian (KDE Plasma or Xfce) and Arch Linux ARM (KDE Plasma or Xfce). More distros are coming, then other operating systems.

Try it: download the IPA from the v0.1 release, sign it with your own Apple account, and turn on JIT with StikDebug or crate's built-in StikJIT. INSTALL.md walks you through it. I've only tested it on my iPhone Duo so far, so device reports are very welcome, even if it just works. It's early, so expect rough edges; networking speed and boot time are the main ones I'm working on.

- App: https://github.com/oneamendez/crate-ios

- Engine: https://github.com/oneamendez/crate

On Henge: it came out while I was building this, and I've tried it, but crate was written from public specs, not from Henge's or QEMU's code. I'd rather solve things my own way first and compare later.

Why I built it: I like rabbit holes. I was designing a biped robot in Autodesk and wanted to keep working on it from my phone, but nothing ran Linux fast enough, so I built my own. Over the next couple of weeks I'll share the Magic Keyboard-style keyboard I'm building for my iPhone Duo, and eventually the robot. I've kept most of my projects to myself until now, and I want to start sharing them.

Edit: v0.1.2 is out and fixes two bugs in the first release, so grab that one instead. Details in the comments.

Edit: v0.1.4 is out with a bunch of stuff from this thread: external monitor support (your phone turns into a trackpad), mouse support on iPad, picking your disk size, and more reliable JIT with LocalDevVPN. https://github.com/oneamendez/crate-ios/releases/tag/v0.1.4

Edit: v0.1.5 is out with more memory options for your VMs: 2, 10 and 12 GB, alongside 4, 6 and 8. If crate closes on you, it’s usually iOS stopping it for using too much memory, so try lowering the VM to 2 or 4 GB. On my iPhone 16 (8 GB), Ubuntu with GNOME at 2 GB now runs Chrome and YouTube without closing. https://github.com/oneamendez/crate-ios/releases/tag/v0.1.5

246 Upvotes

66 comments sorted by

•

u/AutoModerator 17d ago

Free Apple accounts are limited to 3 active sideloaded apps.

One common workaround is LiveContainer, which allows you to run additional apps inside a container and reduce how often apps need to be reinstalled.

Typical method:

  • Sideload GetMoreRam
  • Use it to apply the increased memory entitlement to LiveContainer
  • Uninstall GetMoreRam to avoid hitting the 3 app limit
  • Then sideload StikDebug for JIT activation

LiveContainer may also need to be uninstalled and reinstalled before the entitlement works correctly.

LiveContainer can also install two additional LiveContainers (for a total of three). This setup can further reduce the need to constantly add/remove sideloaded apps, but it is more advanced and may not work reliably for everyone.

LiveContainer is not always officially supported by emulator developers and can sometimes cause unexpected issues. If something breaks while using LiveContainer, try reproducing the issue without it before asking for support.

Do not ask for or share paid certificates, piracy tools, or bypass services here.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

5

u/Just-A-Random-ID 17d ago

Nice

4

u/oneamendez 17d ago

Thanks! Glad it’s finally out. I usually get my projects about 95% done, just usable enough for me, so actually shipping this one feels good. The engine was by far the most time-consuming part to build. My goal is to make crate my daily driver for personal engineering projects, so next up is making it more usable: better external keyboard support, a full-screen desktop on an external monitor for iPads and the Duo (kind of like DeX), and more speed.

3

u/Current_Western_134 17d ago

Does the Bluetooth work on it?

3

u/oneamendez 17d ago

Sort of, depends on what you're after. A bluetooth keyboard paired to your phone works in the terminal view right now. It’s broken on the desktop, but I’m fixing that, should be in by tomorrow. Mouse/trackpad I haven’t really tried, I think it’ll just act like touch for now, so no right click. Controllers don’t work yet. If you mean bluetooth inside linux itself, like pairing headphones from the VM, that’s a no, iOS won’t let an app hand its bluetooth over to a VM. There’s no sound in the VM yet anyway, but it’s on my list.

3

u/AxelAnt2244 16d ago

how does performance compare to Henge?

1

u/oneamendez 16d ago

It isn’t really a fair comparison since Henge runs macOS, and crate runs Linux. But I ran a spike, with AI’s help, that got Henge’s engine booting Linux, so I could compare the two on the same workloads. On a Mac, running the same Debian benchmarks (seconds, lower is better):

  • gcc build: crate 8.2, Henge’s engine 9.3
  • four gcc builds at once: crate 12.1, Henge’s engine 21.4
  • whole benchmark pass: crate 26.0, Henge’s engine 36.1

On an iPhone, Debian reached a prompt in about 5.3 s on crate and 7 s on Henge’s engine. Henge’s engine needed changes to run Linux at a usable speed, so take these as a rough guide, not a verdict on Henge

→ More replies (1)

3

u/CompetitiveBug123 16d ago

First: congratulations on your work! I’ve tried Ubuntu and Debian. Very promising for a v0.1.
Ubuntu: I was able to install Firefox and Chromium through snap, but each time I tried to launch a browser the container crashed.
Debian: I was able to navigate the internet trough the default browser. Mouse scroll wheel didn’t seem to work. Tried downloading VS Code but container crashed.
Max resolution on external display was 1080p.
Overall experience was a bit slow on a IPad Pro M2, but that was expected. I cannot wait to check the next versions!

2

u/oneamendez 16d ago

Thanks so much for the feedback, and I’m glad you were able to try it out! For the crash: did the container freeze, or did the whole crate app close? And does your iPad have 8 or 16 GB of memory? It’s going to keep getting better, so any extra details help.

2

u/CompetitiveBug123 16d ago

Installed most recent version and experimented using Get More Ram (btw, mouse scroll now works, thanks).
My crash problem is due to memory usage continuously growing. Summarized / truncanted logs:
[ 19.554] crate: 4 CPUs, 3114 MiB, on jit

[ 19.594] display: 2560x1072 fits the external display's 3440x1440 px

[ 24.673] memory: footprint 1849 MiB, available 3270 MiB

[ 29.598] memory: footprint 3079 MiB, available 2040 MiB

[ 33.503] memory: iOS warned crate memory is low; footprint 4132 MiB, available 987 MiB

[ 35.170] memory: footprint 4371 MiB, available 748 MiB

[139.641] memory: footprint 5041 MiB, available 78 MiB

2

u/oneamendez 15d ago

Thanks for the logs, they show exactly what’s happening, and glad the scroll wheel works now!

Your iPad lets crate use about 5 GB of memory in total. The VM had about 3.1 GB of memory, and crate also needs room for its JIT and graphics, more so on your 2560×1072 desktop. When it all adds up past the limit, iOS closes the app.

v0.1.5 adds a 2 GB memory option (the smallest used to be 4 GB memory). Set the VM to 2 GB memory in its settings and try again. If it still closes, a lower external display resolution frees up a bit more.

https://github.com/oneamendez/crate-ios/releases/tag/v0.1.5

→ More replies (1)
→ More replies (1)

2

u/tubaraodogroove 17d ago

That’s beautiful

3

u/oneamendez 17d ago

Thanks, I appreciate that. I think so too! Honestly though, that’s mostly ubuntu and gnome looking good.

2

u/Similar_Air133 16d ago

What driver did you use for the gpu translation? And how good does 3D accel work?

2

u/oneamendez 16d ago

It’s virgl right now. Mesa’s virgl driver runs in the guest, and on the iPad side it goes through ANGLE and MoltenVK to Metal. Honestly, 3D hasn’t been my focus yet. The desktops and Chrome run GPU accelerated, but desktop OpenGL tops out low, so something like Blender won’t start on the GPU. I just tried it on an M4 iPad Pro, and it only opens with software rendering. I’m going to dig into the GPU side today.

→ More replies (1)

2

u/yrlmz14 15d ago

Good job! Though, Android is just way better

1

u/oneamendez 14d ago

I think you are right haha 😄 Android gives you more freedom

2

u/justaspeckintime 13d ago

imo this is what makes ios so fun

1

u/oneamendez 13d ago

Totally agree!

2

u/Tony_515 13d ago

Kudos! Hands-down the best I’ve seen in terms of speed and performance on iOS to date. I was doing basic workflows nearly flawlessly on an iPhone 15 Pro. There are some kinks to iron out though. On 0.1.5, the container spontaneously becomes unresponsive/crashes especially in browsers (I tried Firefox and Helium) and VSCode; my phone does get very hot and there’s seemingly no throttling in place; there’s no way to maintain a shared folder between iOS and Crate; no way to run Crate in the background; and mouse support sort of works, at least until there’s a mismatch when trying to drag a window. It would also be nice if we had more control over the VM options, like the number of cores; serial/terminal only; etc. But again, amazing!!

1

u/oneamendez 13d ago

Thanks so much for trying it, and the feedback! What amount of memory did you allocate for the machine? And yes, you are right, I need to add more controls for the vm settings and include a terminal only mode. For filing sharing, that is definitely on the road map, but down the road a little bit to try and prioritize graphics and stability support.

Okay, yeah I'll have to look more into the mouse support, sounds like there are still some bugs.

2

u/Tony_515 12d ago

Of course, thanks for building this!!

I allocated 32 GB storage and tried running the machine with 4 GB and 6 GB of RAM (the iPhone 15 Pro has 8 GB total, and I have the get more ram entitlement on the LiveContainer that I run Crate in). Both configurations had those browser crashes/lockups.  

1

u/oneamendez 12d ago

Thanks, that helps! Try 2 GB of RAM for now. On my iPhone 16 (also 8 GB), Ubuntu GNOME with Chrome and YouTube stays up at 2 GB, where 4 GB crashed.

The reason is that the RAM setting is only what Linux sees. crate needs a lot of memory on top of that for itself: about 1 GB for the JIT’s code cache, and another 1 GB or more for graphics, which keeps growing as the browser draws more. Even with the extra memory entitlement, iOS lets one app use only about 6 GB in total on an 8 GB iPhone. So a 4 GB VM plus crate’s own ~2 GB is right at the limit, and a browser pushes it over. iOS then closes or freezes the whole app before Linux ever knows memory is low, so it can’t close a tab to make room. Your 4 and 6 GB tries probably got about the same amount of memory, too: crate quietly cuts the setting down to what iOS allows.

I’m working on fixing both: leaving room for crate’s own memory automatically, and letting Linux know when iOS is running low, so it frees memory instead of the whole VM going down.

2

u/Volerikan4 16d ago

I can’t get LocalDevVPN to connect with crate. It worked fine with Henge. Is there anything I can try?

2

u/Volerikan4 16d ago

2

u/oneamendez 16d ago

Hey thanks for the feedback, because of this, I released 0.1.4 which has a more robust JIT and LocalDevVPN support so hopefully that fixes the issue. Please let me know and sorry for the inconvenience. https://github.com/oneamendez/crate-ios/releases/tag/v0.1.4

1

u/oneamendez 17d ago

Two bugs in v0.1, both fixed in v0.1.2:

  1. Two “Debian” and “Arch Linux” cards on a fresh install. These were placeholder cards left over from building the UI, not real VMs. You can remove them, nothing gets deleted. v0.1.2 starts with an empty list, and if you already have the placeholders, it removes them when it launches.
  2. “This app cannot be installed because its integrity could not be verified.” The signing script was packing hidden macOS metadata files into the signed IPA, so iOS rejected it when you installed it through Finder or another installer. Installing with sign-ipa.sh --install wasn’t affected. v0.1.2’s script makes a clean IPA.

If you report a bug, the log export now shows which version you’re on (v0.1 showed “0.1” no matter what).

Release: https://github.com/oneamendez/crate-ios/releases/tag/v0.1.2

Thanks to everyone trying it. Keep the bug reports coming.

1

u/oneamendez 16d ago

Quick update, and thanks everyone for all the feedback! v0.1.4 is out and most of it came straight from this thread:

https://github.com/oneamendez/crate-ios/releases/tag/v0.1.4

Let me know how it goes!

1

u/oneamendez 15d ago

Another quick update: v0.1.5 is out, and it adds more memory options for your VMs: 2, 10 and 12 GB, alongside 4, 6 and 8. You can pick it when you install a VM, or change it later in the VM’s settings.

If crate keeps closing on you, it’s most likely iOS stopping it for using too much memory. Try lowering the VM to 2 or 4 GB. On my iPhone 16 (8 GB RAM), Ubuntu with GNOME at 2 GB ran Chrome and YouTube without closing, where before the app would get shut down.

A couple of things to know:

  • On iPhones, iOS only gives an app about 6 GB, so a VM tops out around 4 GB, even if you pick more.
  • On an iPad Pro with 16 GB, you get the full 10 or 12 GB.

https://github.com/oneamendez/crate-ios/releases/tag/v0.1.5

Thanks again for all the reports. Let me know how it goes, especially on lower-memory devices!

1

u/thinman 17d ago

Would it support older iPads?

2

u/oneamendez 17d ago

Depends mostly on how much RAM it has. It needs iPadOS 18 or newer, and the smallest VM is 4GB, so realistically you want an iPad with 8GB or more, which means an M1 or newer. The older A-chip iPads mostly have 3 to 4GB, which might not be enough for the desktop. I just put it on my M4 iPad Pro and I’m going to try it there more, but I haven’t tried anything older. If you’ve got one, give it a shot and tell me what happens.

If you let me know which iPad you have, how much RAM it has and what iPadOS version it’s on, I’d be happy to try putting together a setup that works for it!

1

u/Lordnodob 17d ago

What is the difference between CRATE and Linpad/ Linux for IPad App ? Ä

1

u/oneamendez 16d ago

They take different approaches on how Linux runs on the device. LinPad builds on iSH which runs Linux directly and translates their system calls to iPadOs with no Linux kernel. That keeps it light and windows behave like iPad windows. crate is a full virtual machine: it emulates an arm64 computer and boots the distribution's real kernel. So you get stock Ubuntu, Debian, or Arch with systems and full desktops like GNOME and KDE, and their packages install unchanged.

1

u/EzMell 16d ago

Y cuánto espacio puede tener? El problema para mí de henge es que solo son como 60GB y eso no es nada. 20GB son el OS

1

u/oneamendez 16d ago

Right now every VM gets a fixed 32 GB disk, so it’s smaller than Henge’s for the moment. Even though the disk is set to 32 GB, the VM only takes up the space it actually uses on your device. So right after install, it only takes about the size of the OS itself. One catch: deleting files inside the VM doesn’t give that space back to the device yet. I’m going to add a size slider when you set up a VM, so you can pick something smaller or larger.

1

u/Familiar_Election_94 16d ago

Can I hook up my phone to a desktop and use my phone as a pc? Maybe I could run ZorinOS on it.

3

u/oneamendez 16d ago

Not quite yet. It's on the roadmap and should come soon. Right now, plugging your phone into a monitor will just mirror the phone's screen. As for Zorin, it doesn't have an official ARM version, and crate runs ARM Linux, so it won't run for now.

1

u/BottleNervous5923 16d ago

Can games, or like Prism launcher run on this?

2

u/oneamendez 16d ago

Hahah, I was wondering this too! I’ve actually been trying Prism Launcher on it today. Prism itself installs and runs fine, but I haven’t gotten Minecraft to start yet. Modern Minecraft (1.17 and newer) needs OpenGL 3.2, and right now crate’s GPU support only goes up to OpenGL 2.1 for desktop apps, so it would most likely only run with software rendering, which is very slow. Older Minecraft versions, or simple games that use OpenGL ES, have a better chance, and Windows/x86 games won’t run at all since crate runs ARM Linux. Better GPU support is one of the next things I’m working on, so hopefully soon!

1

u/Ayan_4k 16d ago

Can it run steam games?

1

u/oneamendez 16d ago

As of now, definitely not. Most Steam games are built for x86 PCs, so they’d need another translation layer on top of crate’s, and they need more from the GPU than crate supports right now. I’d like to try setting up a bare Linux environment on the crate engine to run some one day, but right now I’m focused on making the app faster and more stable, so I wouldn’t count on it soon. Eventually, who knows!

1

u/atapla 16d ago

it annoys me because this seems useful but the project is young and im afraid to be happy addicted with this because this fills my needs 100% .. and you decide to stop maintaining your project... Another anoying part is JIT limitation in debugger mode. Is there other technics you can use for that like AOT or whatever else ?

1

u/oneamendez 16d ago

Yeah I get that, I’ve seen a lot of new projects get abandoned fast, some built just to be first. I’ve been running VMs on my phone for years and finally wanted a better one, and I already have workflows that depend on it, so it’s in my own interest to keep improving it.

On JIT, can I ask why you can’t use it? I’m new to the community forums and would like to learn. These days it seems pretty easy: plug your phone into your computer once and let AI set it up. AOT doesn’t really work for a VM, since the code it runs isn’t known until it’s running.

1

u/oneamendez 16d ago

Also, I set it up with the long term in mind. The crate engine is its own open-source library, separate from the iOS app, a bit like how UTM is built on QEMU. So any future app that needs to run arm64 VMs on arm64 can reuse the engine or build on it, and the work isn’t tied to one app.

1

u/Ok-Butterscotch6574 16d ago

Still doesn't beat my UTM HV iPad Pro (11-inch) (4th generation) lol, anyway nice!

1

u/oneamendez 16d ago

Hahaha, yeah I'm jealous! Wish I had a device that could run UTM hypervisor.

→ More replies (1)

1

u/CutzuSD 16d ago

is this better than linux runner?

1

u/oneamendez 16d ago

They take different approaches, basically LinuxRunner, like iSH, runs Linux programs without a Linux kernel: it handles their system calls itself and runs their code with an interpreter, with JIT optional. crate runs a full VM, so a real Linux kernel boots with systemd and everything behaves like a normal Linux machine, but it needs JIT. So LinuxRunner is easier to get running, and crate is closer to real Linux. I haven’t benchmarked them side by side yet, so I can’t say which is faster.

1

u/CutzuSD 16d ago

does crate have built in jit enabler? also i am a bit dum on the jit terminology, but help me get this right, do I need to sign the app with a jit certificate for it to actually use jit right?

1

u/oneamendez 16d ago

Yep, crate has a built-in JIT enabler (built-in StikJIT), and it also works with StikDebug if you already use that.

And no worries, the JIT stuff is confusing. There’s no special “JIT certificate”: the normal development signing you get with a free Apple account is all it needs. That kind of signing lets a debugger attach to the app, and a debugger attaching is what turns JIT on in iOS. The built-in enabler does that for you every time crate opens, so you just set it up once (pair your device and connect LocalDevVPN).

With a free account you re-sign every 7 days like any other sideloaded app, and your VMs stay put when you do. If you have a paid developer account, it lasts a year instead. The INSTALL markdown file in the repo has the steps, plus a prompt you can paste into Claude Code to do it all for you.

2

u/RenegadeUK 16d ago

For Linux users this will be awesome :)

2

u/RUserII 13d ago

crate: unbox a new way to run Linux on iPhone, powered by Rust

Will 'Crate: Unbox' be coming to Apple App Store?

1

u/EzMell 16d ago

No funciona JIT en LC. Aunque me funciona con todas las apps que tengo. Esta es la primera que no puedo activar JIT usando skitdebug en LC2

1

u/ufdfiffif 14d ago

Pls realeese it to TestFlight

1

u/Level-Preference1953 10d ago

Where can you download this? Can’t find it on the App Store

0

u/szableksi 17d ago

work in older iphones like xr?

3

u/oneamendez 17d ago

Probably not, sadly. I’ve only tested on newer stuff (mostly an iPhone Duo on iOS 27.1), so the XR is a total unknown. It’d install, since crate needs iOS 18 and that’s the XR’s last version, and you could get JIT going with StikDebug. The real problem is RAM. The XR only has 3GB, the smallest VM size in the app is 4GB, and the desktop images need it. Even if it boots I doubt a desktop would fit. If you try it anyway let me know how far it gets, I’m curious.

This would be an interesting optimization, and definitely peaks my interest. On how to get the memory footprint super low. May have to add this to the road map.

0

u/-snip- 16d ago edited 16d ago

I find it so funny that vibe coders are so fixated on rust. It nearly defeats the purpose of using it. Such a weird trend. Also it would probably help if you provided some actual information on what makes this faster. It's great that claude is boasting this claim to you, but I find it very hard to believe this is 5x faster than a pretty standard vm with jit. That's an insane claim to make.

2

u/oneamendez 16d ago

QEMU’s JIT is built to run any kind of CPU on any other, so it takes every instruction apart and rebuilds it from scratch, even when the guest and the device are both arm64. crate only does arm64 on arm64, so most instructions can run as they are, and it only rewrites the few that touch memory or the hardware.

The numbers are in the README benchmarks. On an M3 MacBook Air, a set of workloads (gcc, node, python, xz, process spawns and so on) takes QEMU 10’s TCG 130.5 s and crate 24.5 s. Every run’s output is hashed and has to match native. Native through Apple’s Hypervisor framework is still about 2.7x faster than crate, so it’s not magic, just less overhead.