https://github.com/vorgestern/srlua
Tool to create executable from Lua script
https://github.com/vorgestern/srlua
binary lua runtime tool
Last synced: 5 months ago
JSON representation
Tool to create executable from Lua script
- Host: GitHub
- URL: https://github.com/vorgestern/srlua
- Owner: vorgestern
- License: mit
- Created: 2024-12-15T20:18:04.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-12-16T02:29:33.000Z (over 1 year ago)
- Last Synced: 2024-12-28T12:30:55.455Z (over 1 year ago)
- Topics: binary, lua, runtime, tool
- Language: C++
- Homepage:
- Size: 20.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- License: LICENSE
Awesome Lists containing this project
README
# Purpose
Turn a Lua script into an executable.
Inspired by Luiz Henrique de Figueiredo's
[srlua](https://web.tecgraf.puc-rio.br/~lhf/ftp/lua/index.html).
Further scripts loaded with dofile or require will not be embedded,
but can still be found if `LUA_PATH` or `LUA_CPATH` are set appropriately.
# How to use
srlua add.lua Will create ./add.exe, embedding add.lua.
./add 21 22 Will execute the embedded script, passing the arguments.
srlua add.lua other.exe Will create ./other.exe instead.
# Improvements over the original
- No need for a second executable, srlua is a standalone solution.
- Improved error messages from embedded scripts by embedding the script name along with its content.
- Rewritten in C++
- Windows build
# How to build
## on Windows
Use buildsys/VS17/SRLua.sln Release/32 bits will be built in repository root.
## or on Linux
Use Makefile
make Will make srlua and compile add.lua to ./add