ULua: Universal Lua Distribution

Download ULua

More than 300 binary packages updated daily from Luarocks

For Windows (7 onward), OSX (10.5 onward) and Linux (2009 onward) in x86 and x64 variants

No compiler required, no external dependencies, portable, powered by LuaJIT

Recently Updated

DateModuleVersion
2016-08-26resty_dogstatsd1.0.1-103
2016-08-25oo0.4-103
2016-08-25huntable0.9-103
2016-08-25resty0.68
2016-08-24resty0.67
2016-08-22resty0.65
2016-08-22resty0.66
2016-08-22ldoc1.4.6-103
2016-08-21ldoc1.4.5-103
2016-08-20lpeg_patterns0.3-3

Install

Unzip the downloaded file into an arbitrary folder. This will create a single sub-folder named ulua which contains the ULua distribution:


ulua
├── lua.cmd           # LuaJIT executable for Windows.
├── lua               # LuaJIT executable for OSX and Linux.
├── host
│   ├── config.lua    # Global configuration (see PKG).
│   ├── init          # Initialization scripts folder.
│   ├── tmp           # Temporary files folder.
│   └── pkg           # Downloaded packages cache folder.
├── bin
│   ├── upkg.cmd      # Package manager executable for Windows.
│   ├── upkg          # Package manager executable for OSX and Linux.
│   └── ...           # Other executables depending on installed packages.
├── pkg               # Package manager package.
└── ...               # Other installed packages.

Run

The lua executable starts LuaJIT, the Lua manual and the LuaJIT manual document its usage:


# On Windows:
cd folder_containing_ulua/ulua
lua      [options] [script [args]]

# On OSX and Linux:
cd folder_containing_ulua/ulua
./lua    [options] [script [args]]

By default LuaJIT runs in 32-bit mode, to run it in 64-bit mode set the environment variable BIT=64:


set BIT=64       # On Windows.
export BIT=64    # On OSX and Linux.

On Linux, if LuaJIT 32-bit is executed on a distribution lacking the 32-bit C runtime, this will result in a meaningless error such as luajit: command not found. Either launch LuaJIT in 64-bit mode or install the required Linux libraries.

Packages

The upkg executable provides a convenient way of managing ULua:


# On Windows:
cd folder_containing_ulua/ulua/bin
upkg available     # List all available packages.
upkg add socket    # Download and install the socket package (LuaSocket library).
upkg add pl        # Download and install the pl package (PenLight library).
upkg update        # Update all packages to the latest version.

# On OSX and Linux:
cd folder_containing_ulua/ulua/bin
./upkg available     # List all available packages.
./upkg add socket    # Download and install the socket package (LuaSocket library).
./upkg add pl        # Download and install the pl package (PenLight library).
./upkg update        # Update all packages to the latest version.

ULua features LuaRocks integration: new and updated rocks are automatically tracked, compiled and made available in ULua. More than 300 of such packages are currently available for installation, see LuaRocks Modules.

ULua also features a number of Native packages, i.e. packages that are developed directly for ULua according to its package manager specifications.