Installing universal Lua modules on macOS using LuaRocks

Just a quick post to share how to install universal (arm64+x64) Lua modules on macOS using LuaRocks, since by default it only compiles for the current architecture and I couldn't find it documented anywhere: $ luarocks \ CFLAGS="-arch arm64 -arch x86_64" \ LIBFLAG="-arch arm64 -arch x86_64 -undefined dynamic_lookup -all_load" \ install someluamodule The CFLAGS parameter does what you would expect,…