Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

luac(1) [netbsd man page]

LUAC(1) 						      General Commands Manual							   LUAC(1)

NAME
luac - Lua compiler SYNOPSIS
luac [ options ] [ filenames ] DESCRIPTION
luac is the Lua compiler. It translates programs written in the Lua programming language into binary files that can be later loaded and executed. The main advantages of precompiling chunks are: faster loading, protecting source code from accidental user changes, and off-line syntax checking. Pre-compiling does not imply faster execution because in Lua chunks are always compiled into bytecodes before being executed. luac simply allows those bytecodes to be saved in a file for later execution. Pre-compiled chunks are not necessarily smaller than the corresponding source. The main goal in pre-compiling is faster loading. The binary files created by luac are portable only among architectures with the same word size and byte order. luac produces a single output file containing the bytecodes for all source files given. By default, the output file is named luac.out, but you can change this with the -o option. In the command line, you can mix text files containing Lua source and binary files containing precompiled chunks. This is useful to com- bine several precompiled chunks, even from different (but compatible) platforms, into a single precompiled chunk. You can use '-' to indicate the standard input as a source file and '--' to signal the end of options (that is, all remaining arguments will be treated as files even if they start with '-'). The internal format of the binary files produced by luac is likely to change when a new version of Lua is released. So, save the source files of all Lua programs that you precompile. OPTIONS
Options must be separate. -l produce a listing of the compiled bytecode for Lua's virtual machine. Listing bytecodes is useful to learn about Lua's virtual machine. If no files are given, then luac loads luac.out and lists its contents. -o file output to file, instead of the default luac.out. (You can use '-' for standard output, but not on platforms that open standard out- put in text mode.) The output file may be a source file because all files are loaded before the output file is written. Be careful not to overwrite precious files. -p load files but do not generate any output file. Used mainly for syntax checking and for testing precompiled chunks: corrupted files will probably generate errors when loaded. Lua always performs a thorough integrity test on precompiled chunks. Bytecode that passes this test is completely safe, in the sense that it will not break the interpreter. However, there is no guarantee that such code does anything sensible. (None can be given, because the halting problem is unsolvable.) If no files are given, then luac loads luac.out and tests its contents. No messages are displayed if the file passes the integrity test. -s strip debug information before writing the output file. This saves some space in very large chunks, but if errors occur when run- ning a stripped chunk, then the error messages may not contain the full information they usually do. For instance, line numbers and names of local variables are lost. -v show version information. FILES
luac.out default output file SEE ALSO
lua(1) http://www.lua.org/ DIAGNOSTICS
Error messages should be self explanatory. AUTHORS
L. H. de Figueiredo, R. Ierusalimschy and W. Celes $Date: 2010/10/31 11:16:49 $ LUAC(1)

Check Out this Related Man Page

LUATEX(1)							    Web2C 2012								 LUATEX(1)

NAME
luatex, texlua, texluac - An extended version of pdfTeX using Lua as an embedded scripting language SYNOPSIS
luatex [--lua=FILE] [OPTION]... [TEXNAME[.tex]] [COMMANDS] luatex [--lua=FILE] [OPTION]... FIRST-LINE luatex [--lua=FILE] [OPTION]... &FMT [ARGS] DESCRIPTION
Run the luaTeX typesetter on TEXNAME, usually creating TEXNAME.pdf. Any remaining COMMANDS are processed as luaTeX input, after TEXNAME is read. Alternatively, if the first non-option argument begins with a backslash, interpret all non-option arguments as a line of luaTeX input. Alternatively, if the first non-option argument begins with a &, the next word is taken as the FMT to read, overriding all else. Any remaining arguments are processed as above. If no arguments or options are specified, prompt for input. If called as texlua it acts as lua interpreter. If called as texluac it acts as lua bytecode compiler. LuaTeX is an extended version of pdfTeX with Unicode and OpenType font support, embeded Lua scripting language, the e-TeX and Omega exten- sions, as well as integrated MetaPost engine, that can create PDF files as well as DVI files. For more information about luatex, see http://www.luatex.org, you can read LuaTeX manual using texdoc utility (texdoc luatex). All LuaTeX text input and output is considered to be Unicode text. In DVI mode, luaTeX can be used as a complete replacement for the TeX engine. In PDF mode, luaTeX can natively handle the PDF, JPG, JBIG2, and PNG graphics formats. luaTeX cannot include PostScript or Encapsulated PostScript (EPS) graphics files; first convert them to PDF using epstopdf (1). OPTIONS
When the LuaTeX executable starts, it looks for the --lua commandline option. If there is no --lua option, the commandline is interpreted in a similar fashion as in traditional pdfTeX and Aleph. But if the option is present, LuaTeX will enter an alternative mode of commandline parsing in comparison to the standard web2c programs. The presence of --lua makes most of other options unreliable, because the lua ini- tialization file can disable kpathsea and/or hook functions into various callbacks. --lua=FILE The lua initialization file. The following two options alter the executable behaviour: --luaonly Start LuaTeX as a Lua interpreter. In this mode, it will set Lua's arg[0] to the found script name, pushing preceding options in negative values and the rest of the commandline in the positive values, just like the Lua interpreter. LuaTeX will exit immediately after executing the specified Lua script. --luaconly Start LuaTeX as a Lua byte compiler. In this mode, LuaTeX is exactly like luac from the standalone Lua distribution, except that it does not have the -l switch, and that it accepts (but ignores) the --luaconly switch. Then the regular web2c options: --debug-format Debug format loading. --draftmode Sets pdfdraftmode so luaTeX doesn't write a PDF and doesn't read any included images, thus speeding up execution. --enable-write18 Synonym for --shell-escape. --disable-write18 Synonym for --no-shell-escape. --shell-escape Enable the write18{command} construct, and Lua functions os.execute(), os.exec(), os.spawn(), and io.popen(). The command can be any shell command. This construct is normally disallowed for security reasons. --no-shell-escape Disable the write18{command} construct and the other Lua functions, even if it is enabled in the texmf.cnf file. --shell-restricted Enable restricted version of write18, os.execute(), os.exec(), os.spawn(), and io.popen(), only commands listed in texmf.cnf file are allowed. --file-line-error Print error messages in the form file:line:error which is similar to the way many compilers format them. --no-file-line-error Disable printing error messages in the file:line:error style. --fmt=FORMAT Use FORMAT as the name of the format to be used, instead of the name by which luaTeX was called or a %& line. --help Print help message and exit. --ini Start in INI mode, which is used to dump formats. The INI mode can be used for typesetting, but no format is preloaded, and basic initializations like setting catcodes may be required. --interaction=MODE Sets the interaction mode. The MODE can be either batchmode, nonstopmode, scrollmode, and errorstopmode. The meaning of these modes is the same as that of the corresponding commands. --jobname=NAME Use NAME for the job name, instead of deriving it from the name of the input file. --kpathsea-debug=BITMASK Sets path searching debugging flags according to the BITMASK. See the Kpathsea manual for details. --mktex=FMT Enable mktexFMT generation, where FMT must be either tex or tfm. --nosocket Disable the luasocket (network) library. --output-comment=STRING In DVI mode, use STRING for the DVI file comment instead of the date. This option is ignored inPDF mode. --output-directory=DIRECTORY Write output files in DIRECTORY instead of the current directory. Look up input files in DIRECTORY first, then along the normal search path. --output-format=FORMAT Set the output format mode, where FORMAT must be either pdf or dvi. This also influences the set of graphics formats understood by luaTeX. --progname=NAME Pretend to be program NAME (only for kpathsea). --recorder Enable the filename recorder. This leaves a trace of the files opened for input and output in a file with extension .fls. --safer Disable some Lua commands that can easily be abused by a malicious document. --synctex=NUMBER Enable/disable SyncTeX extension. --version Print version information and exit. --credits Print credits and version details. The following options are ignored: --8bit, --etex, --parse-first-line, --no-parse-first-line These are always on. --default-translate-file=TCXNAME, --translate-file=TCXNAME These are always off. SEE ALSO
pdftex(1), etex(1), aleph(1), omega(1), lua(1). AUTHORS
The primary authors of LuaTeX are Hartmut Henkel, Taco Hoekwater, and Hans Hagen, with help from Martin Schroder, Karel Skoupy, and Han The Thanh. TeX was designed by Donald E. Knuth, who implemented it using his Web system for Pascal programs. It was ported to Unix at Stanford by Howard Trickey, and at Cornell by Pavel Curtis. The version now offered with the Unix TeX distribution is that generated by the Web to C system (web2c), originally written by Tomas Rokicki and Tim Morgan. luatex 0.70 12 April 2011 LUATEX(1)
Man Page