Programatically detect ARM64 Prism or Rosetta emulation
Major projects with CPU arch-specific code may distribute binaries for multiple CPU architectures for operating systems. Apple Silicon or Microsoft Prism are key examples of emulated binaries. Programs, especially computational programs like Anaconda Python should have the native matching CPU arch software installed. Example code to programatically check if a C++, GNU Octave, Matlab, or Python executable on:
- Apple Silicon is using native or Rosetta
- Windows on ARM64 is using native or Prism