{"id":13496041,"url":"https://github.com/ers35/luastatic","last_synced_at":"2025-04-13T02:07:30.530Z","repository":{"id":46172309,"uuid":"44882134","full_name":"ers35/luastatic","owner":"ers35","description":"Build a standalone executable from a Lua program.","archived":false,"fork":false,"pushed_at":"2023-10-28T13:25:11.000Z","size":371,"stargazers_count":809,"open_issues_count":11,"forks_count":41,"subscribers_count":22,"default_branch":"master","last_synced_at":"2025-03-28T03:09:14.701Z","etag":null,"topics":["lua"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ers35.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2015-10-24T19:51:53.000Z","updated_at":"2025-03-27T03:27:14.000Z","dependencies_parsed_at":"2024-01-08T20:19:18.403Z","dependency_job_id":null,"html_url":"https://github.com/ers35/luastatic","commit_stats":{"total_commits":125,"total_committers":6,"mean_commits":"20.833333333333332","dds":0.248,"last_synced_commit":"c3e1b2ef8f998230fb4c47935e4bdcb1610abab5"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ers35%2Fluastatic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ers35%2Fluastatic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ers35%2Fluastatic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ers35%2Fluastatic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ers35","download_url":"https://codeload.github.com/ers35/luastatic/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247117764,"owners_count":20886439,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["lua"],"created_at":"2024-07-31T19:01:41.225Z","updated_at":"2025-04-04T04:09:50.161Z","avatar_url":"https://github.com/ers35.png","language":"Lua","readme":"`luastatic` is a command line tool that builds a standalone executable from a Lua \nprogram. The executable runs on systems that do not have Lua installed. Lua 5.1, 5.2, \n5.3, 5.4, and LuaJIT are supported.\n\n## Install\nRun luastatic.lua or install from [LuaRocks](http://luarocks.org/modules/ers35/luastatic).\n\n## Usage\n```\nluastatic main.lua[1] require.lua[2] liblua.a[3] library.a[4] -I/include/lua[5] [6]\n  [1]: The entry point to the Lua program\n  [2]: One or more required Lua source files\n  [3]: The path to the Lua interpreter static library\n  [4]: One or more static libraries for a required Lua binary module\n  [5]: The path to the directory containing lua.h\n  [6]: Additional arguments are passed to the C compiler\n```\n\n## Examples\n\n### Single Lua file\n`luastatic main.lua /usr/lib/x86_64-linux-gnu/liblua5.2.a -I/usr/include/lua5.2`\n\n### Embed library.lua for require(\"library\")\n`luastatic main.lua library.lua /usr/lib/x86_64-linux-gnu/liblua5.2.a -I/usr/include/lua5.2`\n\n### C library containing luaopen_()\n`luastatic main.lua library.a /usr/lib/x86_64-linux-gnu/liblua5.2.a -I/usr/include/lua5.2`\n\n### Dynamically link with Lua\n`luastatic main.lua -llua5.2 -I/usr/include/lua5.2`\n\n### Statically link with musl libc\n`CC=musl-gcc luastatic main.lua /usr/lib/x86_64-linux-musl/liblua5.2.a -I/usr/include/lua5.2 -static`\n\n### Cross compile for Windows\n`CC=x86_64-w64-mingw32-gcc luastatic main.lua /usr/x86_64-w64-mingw32/lib/liblua5.2.a -I/usr/x86_64-w64-mingw32/include/lua5.2/`\n\n### LuaJIT 2.0.4 on Ubuntu 16.10\n`luastatic main.lua /usr/lib/x86_64-linux-gnu/libluajit-5.1.a -I/usr/include/luajit-2.0 -no-pie`\n\n### LuaJIT on macOS\n`luastatic main.lua /opt/local/lib/libluajit-5.1.a -I/opt/local/include/luajit-2.0 -pagezero_size 10000 -image_base 100000000`\n\n### Generate the C file but don't compile it\n`CC=\"\" luastatic main.lua`\n\n### Lua using Homebrew\n```sh\n# Install Lua and LuaRocks from Homebrew.\nbrew install lua luarocks\n# Install luastatic from LuaRocks.\nluarocks install luastatic\n# Build using the Homebrew installation path.\nluastatic main.lua $(brew --prefix lua)/lib/liblua.a -I$(brew --prefix lua)/include/lua\n```\n\nSee another example at [Lua.Space](http://lua.space/tools/build-a-standalone-executable).\n\n## Users\n- [MoonTerm](https://github.com/moonsteal/moonterm)\n- [Omnia](https://github.com/tongson/omnia)\n- [Luacheck](https://github.com/mpeterv/luacheck)\n- [Moonscript++](https://github.com/owenkimbrell/Moonscriptxx)\n- [d2info](https://github.com/squeek502/d2info)\n- [reslister](https://github.com/Metastruct/reslister)\n- [aka](https://github.com/bonidjukic/aka)\n- [Thenafter](https://github.com/Jictyvoo/Thenafter)\n- [luatools](https://github.com/ennorehling/luatools)\n- [ttslua-bundle](https://github.com/tjakubo2/ttslua-bundle)\n- [Lunar](https://github.com/lunarlang/lunar)\n- [yon](https://github.com/polm/yon)\n","funding_links":[],"categories":["Lua","Resources"],"sub_categories":["Build Tools and Standalone Makers"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fers35%2Fluastatic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fers35%2Fluastatic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fers35%2Fluastatic/lists"}