Building Erlang for x32 ABI


Currently one of our application runs in an embedded Linux OS inside an Intel Atom (32-bits). However, due hardware reducing costs for long term, we are migrating to Intel Atom 64-bits. So, I’m investigating some ways to still run our applications on 32-bits, and taking advantages of running on 64-bits. But without the overhead as our application fits on 32-bits.

One of the ways is to use what is called x32 ABI. The idea is to build Erlang/OTP for x32. I got some time and did some experiments here: Exploring x32 psABI for Erlang/OTP | meta-erlang. It worked after applying two patches. But further tests are need in order to check if everything still works.

What do you think ? Have you ever tried x32 builds for Erlang/OTP ?

For my context, the idea of x32 is very persuasive, and looks feasible. But I don’t know if it is practical.


A build without the JIT should work out of the box as it’s no different from any other non-JIT 32-bit build.

I don’t know the details of the x86 JIT in the BEAM, but I’d assume it only supports x86_64. x32 is quite “niche” and not exactly widespread compared to the legacy 32-bit mode or the pure 64-bit mode.