1 <!-- luac.man,v 1.17 1999/07/07 16:02:07 lhf Exp -->
4 <TITLE>LUAC man page
</TITLE>
7 <BODY BGCOLOR=
"#FFFFFF">
21 It translates programs written in the Lua programming language
22 into binary files that can be loaded and executed with
28 The main advantages of pre-compiling chunks are:
30 protecting source code from user changes,
32 off-line syntax error detection.
33 The binary files created by
35 are portable to all architectures.
37 Pre-compiling does not imply faster execution
38 because in Lua chunks are always compiled into bytecodes before being executed.
40 simply allows those bytecodes to be saved in a file for later execution.
43 produces a single output file containing the bytecodes
44 for all source files given.
46 the output file is named
48 but you can change this with the
59 can also load and list binary files with the
63 Binary files produced by differents runs of
65 (even in different machines)
66 can be combined into one large file,
69 The result is still a valid binary file
70 and can be loaded with a single call to
75 The internal format of the binary files produced by
77 may change when a new version of Lua is released.
78 We try to maintain compatibility even for binary files,
79 but sometimes it cannot be done.
81 save the source files of all Lua programs that you precompile.
84 Options must be separate.
87 compile (this is the default).
90 undump, i.e., load and list the given binary files.
91 If no files are given, then luac undumps
93 Listing a binary file is useful to learn Lua's virtual machine.
94 Listing is also useful to test the integrity of binary files:
95 corrupted files will probably generate errors when undumped.
96 To test without listing, use
98 For a thourough integrity test,
104 Individual chunks may
105 still control the generation of debug information with
107 If debugging is on, then listings show the names of the local variables.
109 <B>-D
"</B><I>name"</I>
112 for conditional compilation.
117 predefine any symbols,
118 not even the built-in functions.
121 produce a listing of the compiled bytecode for Lua's virtual machine.
122 This is the default when undumping.
125 Save numbers in native format.
127 numbers are saved in text form,
128 for maximum portability.
129 Binary files with numbers in native format are slightly faster to load,
130 but are not completely portable.
132 <B>-o
"</B><I>filename"</I>
135 instead of the default
137 The output file cannot be a source file.
141 Debug information is removed
143 duplicate constants are coalesced.
146 parse sources files but do not generate any output file.
147 Used mainly for syntax checking.
150 quiet; produces no listing.
151 This is the default when compiling.
154 perform a thourough integrity test when undumping.
155 Code that passes this test is completely safe,
156 in the sense that it will not break the interpreter.
158 there is no guarantee that such code does anything sensible.
159 (None can be given, because the halting problem is unsolvable.)
161 <B>-U
"</B><I>name"</I>
164 for conditional compilation.
167 print version information.
171 print the names of the source files as they are processed.
179 <I>"Reference Manual of the Programming Language Lua"</I>
181 <A HREF=
"http://www.tecgraf.puc-rio.br/lua/">http://www.tecgraf.puc-rio.br/lua/
</A>
183 "Lua: an extensible extension language",
184 <I>Software: Practice
& Experience
</I>
188 Error messages should be self explanatory.
193 <I>(
<A HREF=
"mailto:lua@tecgraf.puc-rio.br">lua@tecgraf.puc-rio.br
</A>)
</I>