Updating LuaJIT
Updating JIT
HolyLib has a luajit
module that updates Garry's mod LuaJIT version to a newer one.
In addition, it also restores debug.upvaluejoin,
debug.upvalueid,
debug.setupvalue,
debug.setlocal.
It also exposes lua's original require
function under jit.require
allowing you to require things like ffi
and jit.profiler
.
by default string.buffer
and ffi
are already loaded.
Enabling the module
- Add
-holylib_enable_luajit 1
to the server startup arguments - Restart the server
- Verify using
print(jit.version)
that it updated. (It should print something likeLuaJIT 2.1.1697887905
)