A [WIP] Library & Client implementation of luarocks
Warning
lux is a work in progress and does not have a stable release yet.
Lux serves as an application for:
- Installing and managing rocks
- Creating Lua projects with dependencies, build scripts and desired Lua versions
- Creating and publishing your own rocks
- Embedding rock manipulation logic into your own application
Note
This aims to be a full rewrite of luarocks
, with many flags altered to be more
ergonomic. This is not a drop-in replacement for luarocks
commands you may have in scripts.
lx <command> <options>
To view available options and their descriptions, run lx --help
.
Comparison with luarocks v3.11.1
As this project is still a work in progress, some luarocks features have not been (fully) implemented yet. On the other hand, lux has some features that are not present in luarocks.
The following table provides a brief (incomplete) comparison:
lux | luarocks v3.11.1 | |
---|---|---|
project RockSpec format | TOML | Lua |
builtin build spec |
✅ | ✅ |
make build spec |
✅ | ✅ |
cmake build spec |
✅ | ✅ |
command build spec |
✅ | ✅ |
custom build backends | ✅1 | ✅ |
rust-mlua build spec |
✅ (builtin) | ✅ (external build backend) |
treesitter-parser build spec |
✅ (builtin) | ✅ (external build backend) |
RockSpecs with CVS/Mercurial/SVN/SSCM sources | ❌ (YAGNI2) | ✅ |
install pre-built binary rocks | ✅ | ✅ |
parallel builds/installs | ✅ | ❌ |
install multiple packages with a single command | ✅ | ❌ |
install packages using version constraints | ✅ | ❌ |
proper lockfile support with integrity checks | ✅ | ❌ (basic, dependency versions only) |
auto-detect external dependencies and Lua headers with pkg-config |
✅ | ❌ |
automatic lua detection/installation | ✅ | ❌ |
resolve multiple versions of the same dependency at runtime | ✅ | ✅ |
run tests with busted | ✅ | ✅ |
code formatting with stylua | ✅ | ❌ |
linting with luacheck | ✅ | ❌ |
static type checking | ❌ (planned) | ❌ |
pack and upload pre-built binary rocks | ✅ | ✅ |
add/remove dependencies | ✅ | ❌ |
luarocks.org manifest namespaces | ✅ | ✅ |
luarocks.org dev packages | ✅ | ✅ |
versioning | SemVer3 | arbitrary |
Lux is licensed under MIT.
Contributions are more than welcome! See CONTRIBUTING.md for a guide.
Footnotes
-
Supported via a compatibility layer that uses luarocks as a backend. ↩
-
Mostly compatible with the luarocks version parser, which allows an arbitrary number of version components. To comply with SemVer, we treat anything after the third version component (except for the specrev) as a prerelease/build version. ↩