Library:LuaJIT
Appearance
| Developer | Mike Pall |
|---|---|
| Versions | 2.0.x (2009-2017), 2.1 (rolling, branch v2.1 since 2.1.0-beta1) |
| License | MIT |
| Website | https://luajit.org/ |
| On this wiki | Facts · Code · Notes · Topics |
Mike Pall's tracing JIT compiler and interpreter for Lua 5.1 (MIT): a compact C and assembler VM with its own bytecode (Format:LuaJIT bytecode), a built-in FFI and bit library, embedded in OpenResty, games, mods and tools; usually shipped as lua51.dll or luajit-5.1.so, or linked statically.
Overview
LuaJIT implements the Lua 5.1 language with some 5.2 extensions. The interpreter core is hand-written assembler per architecture (generated with DynASM), so a LuaJIT binary does not contain PUC-Rio's luaV_execute, and the constant tables listed on Library:Lua (luaP_opmodes, luai_ctype_) do not identify it. Many programs rename the DLL to lua51.dll; the exports tell the difference.
Identification
- Version string:
LUAJIT_VERSIONis"LuaJIT 2.1.ROLLING"in the rolling source (src/luajit_rolling.hlines 33-37); release builds substitute the real number, for exampleLuaJIT 2.1.1727870382, and the textCopyright (C) 2005-2026 Mike Pallandhttps://luajit.org/. These strings are in the binary (jit.version,jit.version_num). - Exports (DLL/so builds): the standard
lua_*/luaL_*API plusluaJIT_setmode,luaJIT_profile_start,luaJIT_profile_stop,luaJIT_profile_dumpstack,luaopen_jit,luaopen_ffi,luaopen_bitand the version symbolluaJIT_version_2_1_ROLLING(renamed per release, e.g.luaJIT_version_2_1_0_beta3), which exists so that a program linked against a header and a different library fails to load. - Bytecode: embedded chunks start
1B 4C 4A(Format:LuaJIT bytecode). - Source names: the library files
lib_base.c,lib_jit.c,lib_ffi.c; Lua-side modulesjit.vmdef,jit.bc,jit.dump(when not stripped). - A game that carries a LuaJIT runtime but loads PUC-Rio-style
1B 4C 75 61chunks does not exist (the loader rejects them); use the third byte of the chunk to choose the tool.
Code & repositories
See the linked repository below.
- https://github.com/LuaJIT/LuaJIT @
2a8e017ef1ece6a95b983ffca073d30609dce7c4· license: MIT (declared by the contributor; GitHub's detector did not recognize a license file)
The LuaJIT source (MIT): src/lj_bcdump.h documents the dump format, lj_bc.h the instruction set, lj_bcwrite.c and lj_bcread.c the writer and loader; the v2.1 branch is the rolling release.
Tested on: source read, not run: source read at the pinned commit; nothing built or run · checked 2026-10-18; last activity 2026-10-14
Evidence & references
- LuaJIT/LuaJIT commit 2a8e017ef1ece6a95b983ffca073d30609dce7c4,
src/luajit_rolling.h,src/lj_bcdump.h. Read only.