RepositoryLua
samyeyo

samyeyo/rtc

Lua script to executable compiler

83stars
4forks
1issues
2views

rtc

Made with LuaRT Windows Vista+ MIT License

Build standalone Windows executables from your Lua scripts.

Features | Installation | Usage | Documentation | Links | License

Features

  • Standalone tool : no Makefile, no C compiler needed
  • Compile from command line or using a GUI frontend
  • Build Windows native executable (.exe) from your Lua 5.4.8 scripts
  • Windows desktop or console applications
  • Static executables (without lua54.dll dependency, supports Lua binary modules)
  • Dynamic executables (with lua54.dll dependency)
  • Embed any files with your executable, even Lua binary modules with seamless loading using require()
  • Loads DLL dependencies in embedded files transparently
  • Access embedded files seamlessly from your Lua scripts using sys.File()
  • Deploy your applications easily without the need to install Lua

Installation

Using latest release package

The easiest way to install is to download the latest binary release from the Github repository. Just add the directory where you have unpacked the release package to your Windows system PATH variable.

If you use the release package, you don't need any other dependencies to compile Lua scripts.

Build rtc

To build rtc, you will need to install the LuaRT programming framework sources before to proceed. Go to the src\ directory in the LuaRT folder and type "make rtc" in a command prompt. It should produce a "rtc.exe" and "wrtc.exe"executable.

Usage

rtc command line options

usage:	rtc.exe [-s][-c][-w][-i icon][-o output] [-lmodname] [directory] main.lua
	-s		create static executable (without LUA54.DLL dependency)
	-c		create executable for console (default)
	-w		create executable for Windows desktop
	-i icon		set executable icon (expects an .ico file)
	-o output	set executable name to 'output'
	-Lmoddir	add a new search path for modules
	-lmodname	link the LuaRT binary module 'modname.dll'
	directory	the content of the directory to be embedded in the executable
	main.lua   	the Lua script to be executed

The specified optional directory will then be embedded within the executable with all its content archived in the ZIP format, bundled with the generated executable. As an alternative, you can use wrtc.exe, the GUI frontend which is more usert friendly.

Warning Compiled dynamic executable depends on the provided lua54.dll library. Do not use any other library or your application will throw an error or may crash.

Accessing embedded files from your LuaRT application

To access embedded files from your LuaRT application, just use the global "embed" module. It will return a Zip instance, already open for read access, that contains the directory content provided on the command line during compilation with rtc :

-- extract all the embedded content
embed:extractall("c:/installdir/")

If no embedded content exists, "embed" will be set to a nil value. You should check that the current script is compiled embed table before using it. See the LuaRT Zip object documentation for more information.

Requiring Lua modules from embedded files

To require a LuaRT script file in the embedded files, use require with the name of the module. You can require Lua modules, and binary modules (DLL) without the need to extract first.

-- require for the english.lua module, that must have been previously embedded with rtc 
local english = require "english"
print(english.hello)

License

LuaRT and rtc are copyright (c) 2025 Samir Tine. rtc is open source, released under the MIT License. See full copyright notice in the LICENSE file.

Similar Projects

Discover other similar projects and AI models.

RepositoryPython
billythegoat356/Riptide

A powerful tool allowing you to reverse .EXE back to .PY

188
Jun 1, 2022
RepositoryDart
maxim-saplin/flutter_python_starter

Bundling Python code with Flutter Desktop apps as self-contained binary, interop with Python self-hosted gRPC service

138
Feb 10, 2024
RepositoryPython
ZeroHackz/BunkrDownloader-Portable

Portable executable downloader for Bunkr

134
Nov 21, 2026
RepositoryC++
Fatmike-GH/JitDecrypter

A Just-In-Time Decrypter for Windows executables (x86 and x64) that performs real-time, instruction-level decryption of encrypted code sections, enhancing runtime protection against static and dynamic analysis.

66
Nov 3, 2025
RepositoryPython
MohamedMostafa010/ExeRay

ExeRay AI detects malicious Windows executables using ML. Analyzes entropy, imports, and metadata for rapid classification, aiding incident response. Built with Python and scikit-learn.

65
Mar 30, 2026
RepositoryPython
LussacZheng/you-get.exe

You-Get unofficial build executable for Windows || You-Get 非官方构建的可执行文件

57
Jan 25, 2026
RepositoryLua
NvChad/NvChad

Blazing fast Neovim framework providing solid defaults and a beautiful UI, enhancing your neovim experience.

28.6k
Oct 24, 2026
RepositoryBatchfile
massgravel/Microsoft-Activation-Scripts

Open-source Windows and Office activator featuring HWID, Ohook, TSforge, and Online KMS activation methods, along with advanced troubleshooting.

201.8k
Nov 11, 2026
Repository
jlevy/the-art-of-command-line

Master the command line, in one page

162.8k
Jun 25, 2024