Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support ARM64EC and ARM64X platforms #410

Open
larskanis opened this issue Jan 27, 2025 · 1 comment
Open

Support ARM64EC and ARM64X platforms #410

larskanis opened this issue Jan 27, 2025 · 1 comment

Comments

@larskanis
Copy link
Member

They are described in https://learn.microsoft.com/en-us/windows/arm/arm64ec and https://learn.microsoft.com/en-us/windows/arm/arm64x-pe . More in-depth descriptions are available here: http://www.emulators.com/docs/abc_arm64ec_explained.htm

ARM64EC is an ABI with "emulation compatible" ARM64 code, which can not be executed on a real AMD or Intel CPU. ARM64X is native ARM64 code (which is very similar to the ARM64 Linux ABI) and "emulation compatible" ARM64 code combined into one DLL or EXE file. Neither of them can be executed on a AMD or Intel CPU. It makes most sense for system DLLs on Windows on ARM.

Does it make sense to support ARM64EC or ARM64X in RubyInstaller?

@larskanis
Copy link
Member Author

IMHO from a RubyInstaller perspective neither ARM64EC nor ARM64X make much sense to support:

  • ARM64EC would allow to run ruby and C extensions at almost native speed and still load emulated x64 DLLs into the same ruby process. But it can not load native ARM64 DLLs into the process. In the benchmarks which I executed, the emulated ruby had roughly 80% of the speed of the native ARM64 version. So the emulation runs x64-ruby very well. When the use case requires to run x64 DLLs into the ruby process, than it's best to use the emulated x64 RubyInstaller. If native ARM64 DLLs shall be loaded then the RubyInstaller ARM64 version can be used. It's not possible to mix x64 and native ARM64 into one process.
  • ARM64X could make sense for the libruby DLL. It would allow to embed ruby into an native ARM64 process as well as into an emulated x64 process. But embedded ruby is not a use case for RubyInstaller. If someone want's to embed ruby, he can compile libruby on its own for the desired architecture/ABI.
  • So far there is no MSYS2 platform for ARM64EC or ARM64X, but only clangarm64 which contains native ARM64 code. So there's no runtime environment we can use for building and for the Devkit version: https://www.msys2.org/docs/environments/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant