ProductPromotion
Logo

Lua

made by https://0x3d.site

GitHub - ers35/luastatic: Build a standalone executable from a Lua program.
Build a standalone executable from a Lua program. Contribute to ers35/luastatic development by creating an account on GitHub.
Visit Site

GitHub - ers35/luastatic: Build a standalone executable from a Lua program.

GitHub - ers35/luastatic: Build a standalone executable from a Lua program.

luastatic is a command line tool that builds a standalone executable from a Lua program. The executable runs on systems that do not have Lua installed. Lua 5.1, 5.2, 5.3, 5.4, and LuaJIT are supported.

Install

Run luastatic.lua or install from LuaRocks.

Usage

luastatic main.lua[1] require.lua[2] liblua.a[3] library.a[4] -I/include/lua[5] [6]
  [1]: The entry point to the Lua program
  [2]: One or more required Lua source files
  [3]: The path to the Lua interpreter static library
  [4]: One or more static libraries for a required Lua binary module
  [5]: The path to the directory containing lua.h
  [6]: Additional arguments are passed to the C compiler

Examples

Single Lua file

luastatic main.lua /usr/lib/x86_64-linux-gnu/liblua5.2.a -I/usr/include/lua5.2

Embed library.lua for require("library")

luastatic main.lua library.lua /usr/lib/x86_64-linux-gnu/liblua5.2.a -I/usr/include/lua5.2

C library containing luaopen_()

luastatic main.lua library.a /usr/lib/x86_64-linux-gnu/liblua5.2.a -I/usr/include/lua5.2

Dynamically link with Lua

luastatic main.lua -llua5.2 -I/usr/include/lua5.2

Statically link with musl libc

CC=musl-gcc luastatic main.lua /usr/lib/x86_64-linux-musl/liblua5.2.a -I/usr/include/lua5.2 -static

Cross compile for Windows

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/

LuaJIT 2.0.4 on Ubuntu 16.10

luastatic main.lua /usr/lib/x86_64-linux-gnu/libluajit-5.1.a -I/usr/include/luajit-2.0 -no-pie

LuaJIT on macOS

luastatic main.lua /opt/local/lib/libluajit-5.1.a -I/opt/local/include/luajit-2.0 -pagezero_size 10000 -image_base 100000000

Generate the C file but don't compile it

CC="" luastatic main.lua

Lua using Homebrew

# Install Lua and LuaRocks from Homebrew.
brew install lua luarocks
# Install luastatic from LuaRocks.
luarocks install luastatic
# Build using the Homebrew installation path.
luastatic main.lua $(brew --prefix lua)/lib/liblua.a -I$(brew --prefix lua)/include/lua

See another example at Lua.Space.

Users

More Resources
to explore the angular.

mail [email protected] to add your project or resources here 🔥.

Related Articles
to learn about angular.

FAQ's
to learn more about Angular JS.

mail [email protected] to add more queries here 🔍.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory