Luart script to executable compiler

rtc.exe is a Lua script to executable compiler to build standalone Windows executables from your Luart scripts. It's then easier to deploy your applications without the need to install Luart for end users.

You can also embed files in your executable, that can be accessed seamlessly from your Lua scripts.

wrtc.exe is a GUI frontend for rtc, more user friendly, available in the bin\ directory.


Creates a static executable (without lua54.dll dependency

Create executable for console application (the default).

Creates executable for Windows desktop application.

Change default executable icon with the one provided.

Sets executable name to 'output'.

Optional path of the directory to be embedded in the executable.

The Lua script that will be executed first.

Howto access embedded files from your Luart application

Compiled programs with embedded content have a global embed module loaded at program start. The module contains all the necessary to interact with the embedded content.

It contains a "zip" member that hold a Zip instance already open for read access, that contains the directory content provided during compilation with rtc.
If no embedded content exists, embed will be a nil value.

You can check that the current script is compiled without embedded content by checking if embed is nil.

Howto require for an embedded module in your Luart application

To load an embedded Lua module, just require with the name of the module.
Please note that it works only for Lua scripts. Experimental support is available to load embedded Lua binary modules DLL from memory since Luart 1.3.0, but it might not be working for some binary modules that still needs to be extracted before use.