1 .\" luac.man,v 1.25 2002/12/13 11:45:12 lhf Exp
2 .TH LUAC 1 "2002/12/13 11:45:12"
15 It translates programs written in the Lua programming language
16 into binary files that can be latter loaded and executed.
18 The main advantages of precompiling chunks are:
20 protecting source code from user changes,
22 off-line syntax checking.
24 Pre-compiling does not imply faster execution
25 because in Lua chunks are always compiled into bytecodes before being executed.
27 simply allows those bytecodes to be saved in a file for later execution.
30 produces a single output file containing the bytecodes
31 for all source files given.
33 the output file is named
35 but you can change this with the
39 The binary files created by
41 are portable to all architectures with the same word size.
43 binary files created on a 32-bit platform (such as Intel)
44 can be read without change in another 32-bit platform (such as Sparc),
45 even if the byte order (``endianness'') is different.
47 binary files created on a 16-bit platform cannot be read in a 32-bit platform,
52 text files containing Lua source and
53 binary files containing precompiled chunks.
54 This is useful to combine several precompiled chunks,
55 even from different (but compatible) platforms,
56 into a single precompiled chunk.
60 to indicate the standard input as a source file
63 to signal the end of options
65 all remaining arguments will be treated as files even if they start with
68 The internal format of the binary files produced by
70 is likely to change when a new version of Lua is released.
72 save the source files of all Lua programs that you precompile.
75 Options must be separate.
78 produce a listing of the compiled bytecode for Lua's virtual machine.
79 Listing bytecodes is useful to learn about Lua's virtual machine.
80 If no files are given, then
84 and lists its contents.
89 instead of the default
91 The output file may be a source file because
92 all files are loaded before the output file is written.
93 Be careful not to overwrite precious files.
96 load files but do not generate any output file.
97 Used mainly for syntax checking and for testing precompiled chunks:
98 corrupted files will probably generate errors when loaded.
99 Lua always performs a thorough integrity test on precompiled chunks.
100 Bytecode that passes this test is completely safe,
101 in the sense that it will not break the interpreter.
103 there is no guarantee that such code does anything sensible.
104 (None can be given, because the halting problem is unsolvable.)
105 If no files are given, then
109 and tests its contents.
110 No messages are displayed if the file passes the integrity test.
113 strip debug information before writing the output file.
114 This saves some space in very large chunks,
115 but if errors occur when running these chunks,
116 then the error messages may not contain the full information they usually do
117 (line numbers and names of locals are lost).
120 show version information.
130 Error messages should be self explanatory.
135 (lua@tecgraf.puc-rio.br)