1 <!-- $Id: luac.man,v 1.28 2006/01/06 16:03:34 lhf Exp $ -->
4 <TITLE>LUAC man page
</TITLE>
5 <LINK REL=
"stylesheet" TYPE=
"text/css" HREF=
"lua.css">
8 <BODY BGCOLOR=
"#FFFFFF">
22 It translates programs written in the Lua programming language
23 into binary files that can be later loaded and executed.
25 The main advantages of precompiling chunks are:
27 protecting source code from accidental user changes,
29 off-line syntax checking.
31 Precompiling does not imply faster execution
32 because in Lua chunks are always compiled into bytecodes before being executed.
34 simply allows those bytecodes to be saved in a file for later execution.
36 Precompiled chunks are not necessarily smaller than the corresponding source.
37 The main goal in precompiling is faster loading.
39 The binary files created by
41 are portable only among architectures with the same word size and byte order.
44 produces a single output file containing the bytecodes
45 for all source files given.
47 the output file is named
49 but you can change this with the
55 text files containing Lua source and
56 binary files containing precompiled chunks.
57 This is useful because several precompiled chunks,
58 even from different (but compatible) platforms,
59 can be combined into a single precompiled chunk.
63 to indicate the standard input as a source file
66 to signal the end of options
68 all remaining arguments will be treated as files even if they start with
71 The internal format of the binary files produced by
73 is likely to change when a new version of Lua is released.
75 save the source files of all Lua programs that you precompile.
78 Options must be separate.
81 produce a listing of the compiled bytecode for Lua's virtual machine.
82 Listing bytecodes is useful to learn about Lua's virtual machine.
83 If no files are given, then
87 and lists its contents.
92 instead of the default
97 but not on platforms that open standard output in text mode.)
98 The output file may be a source file because
99 all files are loaded before the output file is written.
100 Be careful not to overwrite precious files.
103 load files but do not generate any output file.
104 Used mainly for syntax checking and for testing precompiled chunks:
105 corrupted files will probably generate errors when loaded.
106 Lua always performs a thorough integrity test on precompiled chunks.
107 Bytecode that passes this test is completely safe,
108 in the sense that it will not break the interpreter.
110 there is no guarantee that such code does anything sensible.
111 (None can be given, because the halting problem is unsolvable.)
112 If no files are given, then
116 and tests its contents.
117 No messages are displayed if the file passes the integrity test.
120 strip debug information before writing the output file.
121 This saves some space in very large chunks,
122 but if errors occur when running a stripped chunk,
123 then the error messages may not contain the full information they usually do.
125 line numbers and names of local variables are lost.
128 show version information.
136 <A HREF=
"http://www.lua.org/">http://www.lua.org/
</A>
138 Error messages should be self explanatory.