1 .TH luajit 1 "" "" "LuaJIT documentation"
3 luajit \- Just-In-Time Compiler for the Lua Language
7 [\fIoptions\fR]... [\fIscript\fR [\fIargs\fR]...]
12 This is the command-line program to run Lua programs with \fBLuaJIT\fR.
14 \fBLuaJIT\fR is a just-in-time (JIT) compiler for the Lua language.
15 The virtual machine (VM) is based on a fast interpreter combined with
16 a trace compiler. It can significantly improve the performance of Lua programs.
18 \fBLuaJIT\fR is API\- and ABI-compatible with the VM of the standard
19 Lua\ 5.1 interpreter. When embedding the VM into an application,
20 the built library can be used as a drop-in replacement.
24 Run the given chunk of Lua code.
27 Load the named library, just like \fBrequire("\fR\fIlibrary\fR\fB")\fR.
30 Save or list bytecode. Run without arguments to get help on options.
33 Perform LuaJIT control command (optional space after \fB\-j\fR).
36 Control LuaJIT optimizations.
39 Run in interactive mode.
42 Show \fBLuaJIT\fR version.
45 Stop processing options.
48 Read script from stdin instead.
50 After all options are processed, the given \fIscript\fR is run.
51 The arguments are passed in the global \fIarg\fR table.
53 Interactive mode is only entered, if no \fIscript\fR and no \fB\-e\fR
54 option is given. Interactive mode can be left with EOF (\fICtrl\-Z\fB).
57 luajit hello.lua world
59 Prints "Hello world", assuming \fIhello.lua\fR contains:
61 print("Hello", arg[1])
63 luajit \-e "local x=0; for i=1,1e9 do x=x+i end; print(x)"
65 Calculates the sum of the numbers from 1 to 1000000000.
67 And finishes in a reasonable amount of time, too.
69 luajit \-jv \-e "for i=1,10 do for j=1,10 do for k=1,100 do end end end"
71 Runs some nested loops and shows the resulting traces.
74 \fBLuaJIT\fR is Copyright \(co 2005-2011 Mike Pall.
76 \fBLuaJIT\fR is open source software, released under the MIT license.
79 More details in the provided HTML docs or at:
82 More about the Lua language can be found at:
83 .IR http://lua.org/docs.html