Could the same luajit compile code both run on 32bit and 64bit devices?


I have used luajit 2.1.0 in my project and use "cocos luacompile " to generate luajit compile code, but it could only run on 32bit device. When I use “cocos luacompile --bytecode-64bit” and this could run on 64bit device but not on 32bit device.
So my question is does different device use different luajit compile code? Could they run the same luajit compile code? If they use different code, how could I judge which code to use??


64bit and 32bit bytecode are different, if you want same bytecode, plz use Lua 5.1.5.

Ref to


what do you mean? I change my lua to 5.1.5 , 32bit and 64bit device can use the same luajit compile code? Is this right? If this is true, I should 32bit or 64bit code?


Or you mean I should use the origin lua code without luajit compile.


just use Lua bytecode not LuaJIT in your game.


Ok, thanks, I know what u mean.