WeaselGames / godot_luaAPI

Godot LuaAPI
https://luaapi.weaselgames.info
Other
371 stars 28 forks source link

Support LuaJIT #85

Closed Trey2k closed 1 year ago

Trey2k commented 1 year ago

I have not worked with LuaJIT yet, however I would like to add support for it. According to benchmarks it can make a huge difference to performance. Ideally the Lua VM should be decoupled as part of this so other back ends can be used in the future. IE luau.

LuaJIT C api: https://luajit.org/ext_c_api.html

Trey2k commented 1 year ago

I missed something important with this. Of course Lua 5.4 and LuaJIT will have conflicting symbols. There are several ways I see to get around this. I found this solution, but it feels a little too janky for me to want to use.

The 2 real options in my opinion are

  1. Make it a compile time option.
  2. Switch the project to LuaJIT only.