2
0
Fork
You've already forked luarocks-cross
0
Adds cross-build support to the Luarocks package manager
  • Lua 100%
2026年06月19日 11:31:19 +02:00
luarocks/hooks Add installation support for multi-arch rockspecs 2026年03月10日 19:53:56 +01:00
luarocks-cross Improve architecture-specific tree injection 2026年06月19日 11:29:06 +02:00
rockspecs Release v1.0.1 2026年06月19日 11:31:19 +02:00
changelog.md Release v1.0.1 2026年06月19日 11:31:19 +02:00
LICENSE Add license 2026年06月01日 17:06:00 +02:00
luarocks-cross-scm-0.rockspec rockspec: Add metadata 2026年06月01日 17:11:46 +02:00
readme.md Add license 2026年06月01日 17:06:00 +02:00

🤞 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