Project Announcing Lux - a Modern Package Manager for Lua
It's time Lua got the ecosystem it deserves.
Lux is a new package manager for creating, maintaining and publishing Lua code. It does this through a simple and intuitive CLI inspired by other well-known package managers like cargo.
Features
- Has an actual notion of a "project", with a simple governing
lux.tomlfile. - Installs and builds Lua packages in parallel for maximum speed.
- Allows you to add/remove/update dependencies with simple commands. This includes finding outdated packages!
- Handles the generation of rockspecs for you for every version of your project - say goodbye to 10 rockspec files in your source code.
- Has builtin commands for project-wide code formatting (powered by
stylua) as well as project-wide linting (powered byluacheck). - Has native support for running tests with
busted. - Uploading a new version of a package is as simple as
lx upload! - Is fully portable between systems and handles the installations of Lua headers for you, ensuring that all users get the same environment.
Documentation
The project can be found at https://github.com/nvim-neorocks/lux
A tutorial as well as guides can be found on our documentation website.
We're announcing the project now as it has hit a state of "very usable for everyday tasks". We still have things to flesh out, like error messages and edge cases, but all those fixes are planned for the 1.0 release.
If you have any questions or issues, feel free to reach out in the Github discussions or our issue tracker. Cheers! :)
The Lux Team
135
Upvotes
17
u/[deleted] Apr 06 '25
Does it support rockspecs? Also using toml is a very intresting decision, why not just Lua?
3
u/thewrinklyninja Apr 06 '25
So like UV but for Lua?
10
u/Amablue Apr 07 '25 edited Apr 07 '25
Just out of curiosity, why is the command line tool called lx when lux is already a pretty short name?
(I ask somewhat selfishly, as I have a custom branch of Lua that I use with some extensions to the language, which I call
lxtoo)9
u/Itchy_Bumblebee8916 Apr 07 '25
I have never had a good experience using LuaRocks so I'm hype to try this out.
6
u/kotothebest Apr 07 '25
Cool. Would you elaborate that a bit more against existing package managers: luarocks and lit, mainly? How is that better, maybe drawbacks / edge cases...
11
u/fuxoft Apr 06 '25
Why TOML when Lua itself is specifically designed to easily describe data structures?
3
u/CirnoIzumi Apr 06 '25
Is it gonna be cross platform? It would be neat to finally have one that just works on windows
3
u/loonite Apr 06 '25
Sounds interesting. I'll give it a go sometime
2
u/Cootshk Apr 06 '25
Do you have a discord server or something similar?
2
u/[deleted] Apr 07 '25
Great work. Lua need a better Packeger Manager; Lua loss popularity because it's hard to install libs compared with python
1
u/MaverickRelayed Apr 07 '25
Congrats on making this!
How do you handle support for popular dialects like Luau? I see that in your docs you mention using Roblox’s Lua Styling Guide, but nothing about Luau.
1
u/SangoFighter Apr 08 '25
Does it work with Teal?
1
u/Striking-Space-373 Apr 09 '25 edited Apr 09 '25
So there's your crate called lux-cli then there's another random crate called lux?
1
u/[deleted] Apr 09 '25
Super excited to see this, Lua has desperately needed more modern tooling.
The github repository lists static type checking as planned, does that mean IDE integration (e.g. a vscode extension) is as well? Could it replace the normally used Lua language server in a workflow?
1
u/graveyard_bloom Apr 09 '25
Can I use this with LuaJIT?
1
u/cretingame Apr 11 '25
I love the idea to create a modern package manager but why using Rust instead of lua ?
The main advantage of lua, you can embedded in almost any system. You can even use lua in tiny MCU. I use lua in several embedded system. I would not recompile the package manager for each different target. In addition compiling in Rust is very slow ...
1
u/jayden_9999 Apr 11 '25
This is the same Lua that has yet to add in actual integers, there's a reason lua doesn't have a popular package manager let alone ecosystem and it's because people can only write basic, crap scripts within lua. and barely any real programs due to the lack of integer support for the native builds of lua...