1luajit(1)                    LuaJIT documentation                    luajit(1)
2
3
4

NAME

6       luajit - Just-In-Time Compiler for the Lua Language
7

SYNOPSIS

9       luajit [options]... [script [args]...]
10

WEB SITE

12       https://luajit.org
13

DESCRIPTION

15       This is the command-line program to run Lua programs with LuaJIT.
16
17       LuaJIT is a just-in-time (JIT) compiler for the Lua language.  The vir‐
18       tual machine (VM) is based on a fast interpreter combined with a  trace
19       compiler. It can significantly improve the performance of Lua programs.
20
21       LuaJIT  is  API- and ABI-compatible with the VM of the standard Lua 5.1
22       interpreter. When embedding the VM into an application, the  built  li‐
23       brary can be used as a drop-in replacement.
24

OPTIONS

26       -e chunk
27              Run the given chunk of Lua code.
28
29       -l library
30              Load the named library, just like require("library").
31
32       -b ... Save  or list bytecode. Run without arguments to get help on op‐
33              tions.
34
35       -j command
36              Perform LuaJIT control command (optional space after -j).
37
38       -O[opt]
39              Control LuaJIT optimizations.
40
41       -i     Run in interactive mode.
42
43       -v     Show LuaJIT version.
44
45       -E     Ignore environment variables.
46
47       --     Stop processing options.
48
49       -      Read script from stdin instead.
50
51       After all options are processed, the given script is  run.   The  argu‐
52       ments are passed in the global arg table.
53
54       Interactive  mode  is  only  entered,  if no script and no -e option is
55       given. Interactive mode can be left with EOF (Ctrl-Z).
56

EXAMPLES

58       luajit hello.lua world
59
60              Prints "Hello world", assuming hello.lua contains:
61                print("Hello", arg[1])
62
63       luajit -e "local x=0; for i=1,1e9 do x=x+i end; print(x)"
64
65              Calculates the sum of the numbers from 1 to 1000000000.
66              And finishes in a reasonable amount of time, too.
67
68       luajit -jv -e "for i=1,10 do for j=1,10 do for k=1,100 do end end end"
69
70              Runs some nested loops and shows the resulting traces.
71
73       LuaJIT is Copyright © 2005-2023 Mike Pall.
74       LuaJIT is open source software, released under the MIT license.
75

SEE ALSO

77       More details in the provided HTML docs or at: https://luajit.org
78       More about the Lua language can be found at: https://lua.org/docs.html
79
80       lua(1)
81
82
83
84                                                                     luajit(1)
Impressum