- Lua 100%
| luarocks/hooks | Add installation support for multi-arch rockspecs | |
| luarocks-cross | Improve architecture-specific tree injection | |
| rockspecs | Release v1.0.1 | |
| changelog.md | Release v1.0.1 | |
| LICENSE | Add license | |
| luarocks-cross-scm-0.rockspec | rockspec: Add metadata | |
| readme.md | Add license | |
🤞 Luarocks Cross
Adds cross-build support to the LuaRocks package manager. Part of the LRocket Project.
Installation
luarocks-cross will usually be installed automatically by otypes that require it, but it can also be installed directly via LuaRocks:
> luarocks install luarocks-cross
Usage
luarocks-cross automatically works with the LRocket compiler.
To learn about cross-compilation via LRocket, head over to the LRocket Project Cross-Compilation documentation page.
Additionally, luarocks-cross adds three new command line options to luarocks:
| Option | Description |
|---|---|
--target |
Target triple for cross-building |
--host-lua-version |
Host Lua version to install build dependencies for |
--driver-option |
Pass an option to the luarocks build driver |
Example
A simple example of installing lua-cmsgpack explicitly for Linux (musl):
# Installs `lua-cmsgpack` for Linux (arm64) with musl libc
> luarocks install --target aarch64-linux-musl lua-cmsgpack
Luarocks Trees
Luarocks Cross automatically creates architecture-specific rocks trees in $HOME/.luarocks.
You can specify a custom tree at any time using the usual --project and --tree parameters of LuaRocks.
Example Home Tree Structure
with luarocks-cross installed
$HOME
.luarocks
# tree for aarch64-linux-musl
aarch64-linux-musl
lib/
share/
# tree for WebAssembly
wasm32-wasi
lib/
share/
# regular tree for your host architecture
lib/
share/
License Information
luarocks-cross is licensed under the MIT License.
Created by Lesosoftware in 2026