Moonjit is a Just-In-Time Compiler (JIT) for the Lua programming language. Lua is a powerful, dynamic and light-weight programming language. It may be embedded or used as a general-purpose, stand-alone language.
Moonjit is a fork of the inactive LuaJIT project and aims to provide a way forward for existing users of LuaJIT looking for continuity in development and maintenance.
Here is an index of the documentation for moonjit. Old documentation for LuaJIT is unmaintained in doc.luajit and is only there as a historical record.
Moonjit ought to run all Lua 5.1-compatible source code just fine. It is
considered a serious bug if the VM crashes or produces unexpected results —
please report this. Lua 5.2 support is in two parts; the backward compatible
elements are built in by default whereas features that break compatibility have
to be enabled using the -DLUAJIT_ENABLE_LUA52COMPAT flag. The installation
instructions have more details.
Please note the branches
git clone git@github.com:<your-username-here>/moonjit.git
git checkout my-changes
make
make check
-s flag to sign off your commit and then push
it to your branch.
git commit -a -s
git push origin my-changes
Fixes: #NUM in the body of the commit log.moonjit has a built-in testsuite that can be exercised by running the following command:
make check
There is also a benchmark suite that can be run as follows:
make bench
If you're fixing a bug in moonjit, make sure you add a test case to exercise the bug so that it does not regress. test/README.md has more details on how to execute and update the testsuite.
The project repository on github has the following main branches:
The following steps need to be performed before tagging a moonjit release:
RELVER to the new version number and set PREREL to an empty string
in MakefileLUA_LJDIR in src/luaconf.hLUAJIT_VERSION, LUAJIT_VERSION_NUM and LUAJIT_VERSION_SYM in
src/luajit.hassert(jit.version_num == xxxxxx, "moonjit core/library version mismatch")
where xxxxxx is the value of LUAJIT_VERSION_NUM.HEAD and the last tag in a PR
comment and update it based on feedback.PREREL in [Makefile(Makefile) to -dev to indicate that development
is now open.