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

lua: allow using moonjit #10265

Merged
merged 1 commit into from
Mar 13, 2020
Merged

lua: allow using moonjit #10265

merged 1 commit into from
Mar 13, 2020

Conversation

iii-i
Copy link
Contributor

@iii-i iii-i commented Mar 5, 2020

Description:
moonjit (https://github.com/moonjit/moonjit) is a continuation of
LuaJIT development, which, as of late, has, unfortunately, come to
a stall.

In comparison to LuaJIT, moonjit, among other things, supports
s390x architecture as well as some of the Lua 5.2 language
features.

With this patch, moonjit can be enabled using

--//source/extensions/filters/common/lua:moonjit=1

bazel flag.

Internally, moonjit integration is based on luajit integration.
Some of the fragments thereof (e.g. luajit.patch) were copy-pasted
with minimal modifications. While arguably ugly, this allows
updating LuaJIT and moonjit independently.

Signed-off-by: Ilya Leoshkevich iii@linux.ibm.com

Risk Level: Low
Testing: Run tests with --//source/extensions/filters/common/lua:moonjit=1 flag
Docs Changes: None
Release Notes: None

Copy link
Member

@dio dio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this. I think we need to add an entry to docs/root/intro/version_history.rst and docs/root/configuration/http/http_filters/lua_filter.rst to let users aware of it (to try it out).

@yselkowitz
Copy link

Why not just use a more recent snapshot of luajit instead, which has support for both IBM architectures?

@dio
Copy link
Member

dio commented Mar 9, 2020

@yselkowitz since this moonjit is an alternative, we can always update luajit "version".

@iii-i
Copy link
Contributor Author

iii-i commented Mar 10, 2020

@dio done.

@yselkowitz where can I get it? I checked master and v2.1 branches of https://luajit.org/git/luajit-2.0.git, and s390x support is not there.

@yselkowitz
Copy link

The OpenResty fork of luajit2 has support for both Power LE and Z in their latest snapshot:

https://github.com/openresty/luajit2

moonjit (https://github.com/moonjit/moonjit) is a continuation of
LuaJIT development, which, as of late, has, unfortunately, come to
a stall.

In comparison to LuaJIT, moonjit, among other things, supports
s390x architecture as well as some of the Lua 5.2 language
features.

With this patch, moonjit can be enabled using

   --//source/extensions/filters/common/lua:moonjit=1

bazel flag.

Internally, moonjit integration is based on luajit integration.
Some of the fragments thereof (e.g. luajit.patch) were copy-pasted
with minimal modifications. While arguably ugly, this allows
updating LuaJIT and moonjit independently.

Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
@iii-i
Copy link
Contributor Author

iii-i commented Mar 12, 2020

@dio done

@yselkowitz what looks interesting about OpenResty fork, is that moonjit maintainer also thinks it's the way forward for the Lua community (openresty/luajit2#80). Unfortunately, the merger discussion has somewhat stalled. What also makes it harder for us to quickly evaluate OpenResty fork, is that their test suite is much smaller than that of moonjit. So we would rather go forward with moonjit for the time being, if possible.

Copy link
Member

@dio dio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@mattklein123 mattklein123 merged commit 2c03496 into envoyproxy:master Mar 13, 2020
wrowe added a commit to wrowe/envoy that referenced this pull request Jan 8, 2021
This reverts commit 2c03496.

See thread https://twitter.com/siddhesh_p/status/1308594269502885889?s=20 @siddhesh_p Sep 22
"It ought to generally be easy to revert to the upstream tree since
they're both [moonjit and luajit] (AFAIK) on the 2.1.x branch. I'll be
happy to help with the transition if needed."

This is no longer maintained code, there is no way for envoy project to
assume responsibility, and after many months, no maintainers have
stepped forward. PR's to luajit effort are one appropriate way forward.

Resolves: envoyproxy#13539

Signed-off-by: William A Rowe Jr <wrowe@vmware.com>
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

Successfully merging this pull request may close these issues.

4 participants