How Fat Does a Fat Binary Need to Be?
> That's how big a statically-linked executable needs to be to run natively without dependencies on Linux, Mac, Windows, FreeBSD, OpenBSD, NetBSD, and BIOS.<p>* on x86.<p>There was a time period when it was reasonable to just assume everything that mattered was x86.  It started sometime in the early 2000s, as non-x86 servers died out and Macs switched to x86.  And it ended last November, when Apple announced Macs would switch to ARM.<p>The author has suggested sticking with x86 and handling other architectures using emulation.  But x86 is the worst possible architecture to emulate, because its strong memory ordering model means that emulators on other architectures essentially must limit the emulated process to a single core.  (Unless you have special hardware support like M1 Macs do… for now.)  Also, any hardware CPU architecture is going to be slower to emulate than a purpose-built bytecode – and we already have a good enough bytecode, WebAssembly.<p>Emulating x86 might make sense anyway if you assume that x86 is and will be the norm, and non-x86 an edge case that can afford to take a performance hit.  But that sure doesn't seem to be the way the wind is blowing.<p>[1] <a href="https://justine.lol/ape.html" rel="nofollow">https://justine.lol/ape.html</a>