Manually Run Rosetta 2 on x86 Binary

This is a bit late, but you can directly run oahd-helper and pass it two file descriptors (the x86 binary to translate as the first and a file to output the translated bin to as the second). The location of oahd-helper varies (on Big Sur it’s in /Library/Apple/usr/libexec/oah, on Monterey its /usr/libexec/rosetta). I made a gist that makes the process simpler, you can find it here: https://gist.github.com/sunflsks/00fe7c740f3b1d9668f55dff80707d03


If you've written a program in C, simply compile the program twice, using Mac's version of gcc, and then use lipo to combine them into one program.

See https://developer.apple.com/documentation/xcode/building_a_universal_macos_binary for Apple's explanation of the process to create a universal Binary (containing both x86_64 and ARM64)