4 ms·
Right, it uses Virtualization Framework. I forked vftool [0] and added direct Rosetta support which was trivial to do according to the Apple documentation; just
by jsd1982 3y ago
Right, it uses Virtualization Framework. I forked vftool [0] and added direct Rosetta support which was trivial to do according to the Apple documentation; just had to convert Swift example code to Obj-C.
Have had a PR open for several months with no attention from the author. I almost forgot about it until seeing this HN headline.
[0] https://github.com/JamesDunne/vftool-rosetta https://github.com/JamesDunne/vftool-rosetta
The Rosetta support is surprisingly trivial to use. The virtualization framework exposes a mountable volume containing a single `rosetta` executable. In the Linux guest, you just register binfmt_misc support that recognizes an x86 ELF image and point it at the `rosetta` binary. It works for docker too so you can run arm64 and amd64 images.