5 ms·
A lot of dev tooling still expects x86_64. Example off the top of my head, Cosmopolitan will not build ARM binaries and will not compile on ARM. (But it WILL bu
by pmarreck 2y ago
A lot of dev tooling still expects x86_64. Example off the top of my head, Cosmopolitan will not build ARM binaries and will not compile on ARM. (But it WILL build x86_64 universal binaries that will run on Apple Silicon and macOS via Rosetta.)
There is also the issue of wanting to have your dev environment be as close to your prod environment as possible, and the vast majority of cloud-based hosting is still x86_64.
- commandersaki 2y agoWith virtualisation you can use Rosetta 2 for Linux to run x86_64 binaries. That's what I do and it's more efficient.
- chatmasta 2y agoUTM uses Rosetta via qemu. It’s the most direct way of emulating x86 on Apple Silicon, using native Apple emulation layer.
- ndiddy 2y agoThen you're emulating everything that runs in the VM, as opposed to using an ARM vm and only emulating the x86 program you want to run. This makes things a lot slower.
- deleted 2y ago[deleted]
- chatmasta 2y agoThat’s a good point… but does Rosetta in a Linux VM somehow use the native MacOS hypervisor? I would like to see a benchmark of these various methods…
- commandersaki 2y agoI don't know how Rosetta 2 for Linux is implemented in Virtualization.Framework - but it exposes it via a mountpoint on the (ARM) Linux VM. The binfmt executable that is exposed essentially does what Rosetta 2 does but for a Linux binary. I think the binfmt executable can be used outside of Virtualization.Framework and can even be used in an ARM VM in say Asahi but people don't because it's not easy to do but also honour system as it's not licensed for use outside of MacOS.
- commandersaki 2y agoYou can't do Rosetta 2 for Linux thru qemu as qemu doesn't use Virtualization.Framework. UTM does support virtualisation via VF.
- worldsavior 2y agoBuilding on a virtual x86_64 barely achieves the performance when building on host, if there was an applicable way.
- pmarreck 2y agoFair enough, but (speaking as a web developer), running a stack locally on Apple Silicon (especially if it has any "interesting" dependencies such as compiled Rust/C libs and whatnot) and expecting the same stack to run identically in the cloud on x64 can still expose differential behavior At the very least, I could test mock deploys from the Apple Silicon side to the x64 VM running locally (over loopback) as an extra data point I don't actually use it for this use-case but now that I'm thinking about it, I might try, because this seems useful
- worldsavior 2y agoFrom a web standpoint it's possible, but when I tried building AOSP on macOS, it didn't turn out great.