Skip to content

Lua and some library statically compiled for linux, windows and mac.

Notifications You must be signed in to change notification settings

pocomane/lua_static_battery

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lua static battery

This is a script to build a static version of lua, using gcc and the musl C library. The toolchain are downloaded from musl.cc. Some usefull libraries are included too.

The script can build linux, windows and mac binaries. Linux binaries are built for both x86 (natively) and arm with hard float (through cross-compile). Windows binaries are built through cross-compile from linux. The mac binaries are built with a default LLVM toolchain, without musl.

In Release page you can fine the output binaries for all the supporterd platforms.

Library list and documentation

Here a link to the documentation of the included software:

  • Lua 5.4.2, the standalone interpreter is in the generated lua.exe
  • Lua File System, it is enabled with local lfs = require "lfs"
  • Lua Socket, it is enabled with local socket = require "socket"
  • Lua Child, it is enabled with local child = require "luachild"
  • LuaProc, it is enabled with local proc = require "luaproc"
  • Glua, it is a lua+script embedding utility

Usage

The build script can be run with

./build.sh

It expects that all the softwares are in specific subfolder. However, an utility script is provided to download the build script as well a all the needed dependencies in a build folder:

curl -L -k "https://raw.githubusercontent.com/pocomane/lua_static_battery/master/pack.sh" | bash -s update
./build/pack/build.sh

To select the target architecture you can set the TARGET environment variable to linux, arm_linux, windows or mac.

To change the download/build directory, you can set the UPDATER_TARGET environment variable.

Build environment

The following software is supposed to be installed in the host system:

  • A posix shell
  • GNU coreutils
  • Tar and Gzip
  • Sed
  • Curl
  • Git

About

Lua and some library statically compiled for linux, windows and mac.

Resources

Stars

Watchers

Forks

Packages

No packages published