Luart interpreters
The easiest way to run a Luart application is to double-click on the .lua
or .wlua
source files in the Windows explorer.
All interpreters can also be executed from the command line.
Usage
luart.exe [-e "statement"] [filename arg1 arg2...]
wluart.exe [-e "statement"] [filename arg1 arg2...]
[-e "statement"]
Executes the Lua statement in double quotes and run the following script if specified (see below).
[filename arg1 arg2...]
Loads and executes the Lua script "filename"
, with optional arguments. Each arguments will be available in the global table arg
in your Lua script :
arg[-1]
contains the fullpath of the running interpreter, as a string, or the current executable fullpath for compiled scripts.
arg[0]
contains the current running script or nil
for compiled executables.
arg[1]
contains the first argument
arg[2]
for the second and so on...
Luart interpreters comparison
Luart comes with serveral versions of the interpreter, located in the \bin
subfolder of the installation directory, each with its own specificities explained in the table below :
Interpreter |
Windows subsystem |
Dependency |
ui module |
luart.exe |
Console |
lua54.dll |
|
wluart.exe |
Desktop |
lua54.dll |
|
luart-static.exe |
Console |
- |
|
wluart-static.exe |
Desktop |
- |
|
- Console versions of the interpreter are suitable for command line tools, as they are running in a command prompt window.
- Desktop versions of the interpreter are for applications based on the Windows GUI, so they include the
ui
module.
- Static interpreters do not depend on
lua54.dll
, but the use of binary modules is strongly discouraged.
- Since Luart 1.2.0, better compatibility with PUC Lua is provided by the integration of the PUC Lua
os
, io
and utf8
modules.