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

luajit vs luajit2 #224

Open
13ilya opened this issue Apr 24, 2024 · 2 comments
Open

luajit vs luajit2 #224

13ilya opened this issue Apr 24, 2024 · 2 comments

Comments

@13ilya
Copy link

13ilya commented Apr 24, 2024

Hello!
I'm a nginx maintainer in openSUSE and I recently had a need to build nginx-lua-module for redis access and I just now found out about luajit and luajit2 and I want to figure out whether I should replace luajit with luajit2, make them alternatives or use luajit2 only for nginx-module-lua.

What is the difference in them and what are the advantages and disadvantages of each over the other.
OpenResty claims luagit2 works much better with mginx-module-lua.
That's all I understand so far.
Why can't OpenResty patches just be added to upstream?
Is it possible to replace luajit with luajit2 in the operating system and what consequences will this cause, for example for gegl used in gimp?
Or does luajit2 work better only with nginx-module-lua and luajit is better for everything else?
LuaJIT/LuaJIT#1191

@zhuizhuhaomeng
Copy link
Contributor

zhuizhuhaomeng commented Apr 25, 2024

What is the difference in them and what are the advantages and disadvantages of each over the other.
OpenResty claims luagit2 works much better with mginx-module-lua.

We usually call it OpenResty LuaJIT for the LuaJIT2 you mentioned.
The OpenResty LuaJIT extends the LuaJIT/LuaJIT with some APIs which improve the performance of the OpenResty.

Why can't OpenResty patches just be added to upstream?

Some of the patches won't be accepted.

Is it possible to replace luajit with luajit2 in the operating system and what consequences will this cause, for example for gegl used in gimp?

OpenResty LuaJIT merges the changes from LuaJIT/LuaJIT in a timely manner.
Replace luajit with luajit2 in the operating system should be OK.
But for the OpenResty itself, we usually embed the LuaJIT into the OpenResty bundle.

@13ilya
Copy link
Author

13ilya commented Apr 27, 2024

Thank you for your reply!
While trying to make luajit and luajit2 non-conflicting, I realized the confusion in the title that the lua maintainer and the original author told me about. You renamed only the project directory name, but you left the names of the libraries and executable file to luajit, which makes it conflict with luajit. I'm downstream fixing that now.

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

No branches or pull requests

2 participants