luajit
Just-In-Time Compiler for the Lua Language
TLDR
SYNOPSIS
luajit [options] [script [args]]
DESCRIPTION
luajit is a Just-In-Time compiler for the Lua programming language. It provides significantly faster execution than the standard Lua interpreter through trace-based JIT compilation, an efficient interpreter, and a built-in FFI (Foreign Function Interface).LuaJIT is fully compatible with Lua 5.1 and includes several extensions. Script arguments are passed via the global `arg` table. Interactive mode is activated automatically when no script or `-e` option is provided.
PARAMETERS
-e chunk
Run the given chunk of Lua code.-l library
Load the named library, equivalent to require("library").-b ...
Save or list bytecode. Run without arguments to get help on options.-j command
Perform a LuaJIT control command (e.g., -jv for verbose trace info, -jdump for detailed trace dumps).-O[opt]
Control LuaJIT optimizations. -O0 disables all optimizations, -O (default) is equivalent to -O3.-i
Run in interactive mode after executing the script or code.-v
Show LuaJIT version.-E
Ignore environment variables.--
Stop processing options.
CAVEATS
LuaJIT is compatible with Lua 5.1 only, not Lua 5.2 or later. The FFI library requires knowledge of C types and native code. JIT compilation is not available on all architectures. The `-b` bytecode format is not compatible with standard Lua bytecode.
HISTORY
LuaJIT was created by Mike Pall starting in 2005. LuaJIT 2.0, featuring the current trace compiler architecture, was released in 2012.
