Skip to content
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

Add optional lua5.3 runtime instead of luajit to provide better compatibility #1682

Closed
waruqi opened this issue Sep 17, 2021 · 6 comments
Closed

Comments

@waruqi
Copy link
Member

waruqi commented Sep 17, 2021

We can support more archs, e.g. riscv, loongarch, ..

@waruqi waruqi changed the title Add optional lua5.1/5.2 backend to provide better compatibility Add optional lua5.1/5.2 backend instead of luajit to provide better compatibility Sep 17, 2021
@waruqi waruqi changed the title Add optional lua5.1/5.2 backend instead of luajit to provide better compatibility Add optional lua5.3 backend instead of luajit to provide better compatibility Sep 17, 2021
@waruqi
Copy link
Member Author

waruqi commented Sep 18, 2021

We added lua5.3 as an optional lua vm backend, and it basically works now. see #1683 and lua53 branch

Installation

$ make RUNTIME=lua
$ ./scripts/get.sh __local__ __install_only__

@titansnow

@waruqi
Copy link
Member Author

waruqi commented Sep 18, 2021

Currently only core.base.bytes cannot be used because it uses ffi, but this is not a big problem. I will let it support lua in the next few days.
The other 99% of the cases have worked normally.

@waruqi waruqi added this to the v2.5.8 milestone Sep 18, 2021
@SirLynix
Copy link
Member

I think Lua 5.2 may be a better compatibility choice than Lua 5.3, mostly because Lua has native integer support from >=5.3 and LuaJIT/Lua 5.2 don't, which may lead to weird behavior

@waruqi
Copy link
Member Author

waruqi commented Sep 18, 2021

I think Lua 5.2 may be a better compatibility choice than Lua 5.3, mostly because Lua has native integer support from >=5.3 and LuaJIT/Lua 5.2 don't, which may lead to weird behavior

This is not a big problem, it works normally on ci, and xmake will try to support lua5.4 later.

Because the code of xmake is implemented using lua 5.1 syntax, and luajit's restrictions on syntax and features seem to be stricter. So in the process of migrating to 5.3, I did not encounter too many problems.

@waruqi
Copy link
Member Author

waruqi commented Sep 18, 2021

because Lua has native integer support from >=5.3

It is also because it supports native integers, so it is more convenient to port the luajit bits module to lua5.3

https://github.com/xmake-io/xmake/blob/dev/xmake/core/base/compat/bit.lua

@waruqi waruqi changed the title Add optional lua5.3 backend instead of luajit to provide better compatibility Add optional lua5.3 runtime instead of luajit to provide better compatibility Sep 19, 2021
@waruqi waruqi closed this as completed Sep 21, 2021
@waruqi
Copy link
Member Author

waruqi commented Oct 10, 2021

We continue to switch to lua5.4.3 #1739

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants