Imported from ../lua-3.2.tar.gz.
[lua.git] / src / luac / README
blob9fba74bbe2621bebf4410f5d007c029ffaf96e36
1 luac translates Lua programs into binary files that can be loaded and executed
2 with lua_dofile in C or with dofile in Lua.
3 The main advantages of pre-compiling chunks are: faster loading,
4 protecting source code from user changes, off-line syntax error detection.
5 luac can also be used to learn about the Lua virtual machine.
7 Here are the options that luac understands:
9  -c             compile (default)
10  -d             generate debugging information
11  -D name        predefine 'name' for conditional compilation
12  -l             list (default for -u)
13  -n             save numbers in native format (file may not be portable)
14  -o file        output file for -c (default is "luac.out")
15  -O             optimize
16  -p             parse only
17  -q             quiet (default for -c)
18  -t             test code integrity
19  -u             undump
20  -U name        undefine 'name' for conditional compilation
21  -v             show version information
22  -V             verbose
23  -              compile "stdin"
25 Finally, luac is an example of how to use the internals of Lua (politely).
26 Also, luac does not need the runtime code and stubs.c makes sure it is not
27 linked into luac. This file also shows how to avoid linking the parser.