-
Notifications
You must be signed in to change notification settings - Fork 32
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
LuaJIT support? #56
Comments
It doesn't seem like LuaJIT is 100% API compatible with Lua 5.2 according to this page. I could be wrong though. If LuaJIT is API compatible with it, i.e. |
So could you add the LuaJIT support in sol? |
Dropping down to Lua 5.1 would be a massive pain, unfortunately. |
I haven't finished building against the latest LuaJIT yet, but they have a flag for 5.2 compatibility that might allow sol to build since we don't make use of _ENV or setenv, which is one of the biggest splits / gripes between the two C APIs. The more glaring issue, however, is that it seems like LuaJIT doesn't support GC on tables, only on userdata and friends. All of the magic we do in sol to make sure there's no memory leaks is predicated on user data, but I'd need to go through the codebase to make sure we don't end up in the situation displayed here. |
The compiler errors say that we would need to figure out the Lua 5.1 equivalents of the following:
unsigned, we can replace with a raw cast to unsigned from double (hacky, but it will work just fine). The following built-in libraries would be missing and thus unopenable for lua:
LuaJIT has the first one built on, so that should be #ifdef'd out, and the second one can be replaced by Coco, but quite honestly I would rather just #ifdef that one out as well and let users manually pick the library of their choice to We'd also need to figure out how to replace |
Ultimately, however, my recommendation would be to wait for Mike Pall to update LuaJIT to work with 5.2 and upcoming 5.3. |
If you are really interested in supporting 5.1, I would suggest looking into the compatability files for lua-intf by @SteveKChiu. Specifically, this and this. |
@skymarshal @happen23 This took a while, but the pull requests referencing this issue has LuaJIT 5.1 support. Once it's evaluated by @Rapptz it should be good to go. Good luck. |
LuaJIT (a lot of uses) is Lua 5.1 syntax and API interface compatible, could sol support it ?
The text was updated successfully, but these errors were encountered: