r/lua • u/VidaOnce • Mar 15 '26
Project LPM v0.7.1 - MacOS support, Website, Lockfiles, Custom Registry
What is LPM?
LPM is a package manager for Lua, written in Lua. It includes a LuaJIT runtime for any operating system, a test runner, and the ability to compile your Lua programs into single executables users can run in <1mB. All of this alongside a package manager and package registry to easily share and reuse lua code, properly version locked and isolated to your individual projects.
A lot of functionality has been added since the last post. You can read the blog posts I wrote for each release. and subscribe to the RSS feed to keep track of lpm. Alternatively, join the discord.
Website
A domain and website is live with documentation for how to use lpm: https://lualpm.com
It also comes with the ability to view the registry.
Registry
LPM has its own custom registry now! It's inspired by the simplistic approach of vcpkg (or Rust's Cargo to an extent) in that it's just a GitHub repo storing links to your hosted code's repositories so you can keep your code wherever you want. It also makes it much easier to maintain as security and file hosting is done by GitHub.
You can view the registry list here: https://lualpm.com/registry
Submitting a package is as simple as creating a project with lpm new ./myproject, and then running lpm publish which will open your web browser to make a pull request to the repository adding the file to the registry.
Namespacing is not implemented but will be done in the future when it becomes more of a concern.
MacOS Support
AArch64 (Apple Silicon) is now supported and passes all of the test suite. Install with curl -fsSL https://lualpm.com/install | sh !
Lockfiles
Since LPM has been centered around git dependencies and local dependencies for monorepos, the need for lockfiles has been minimal. But with the addition of the registry it becomes more crucial. This lockfile simply automatically pins your dependencies' specific git commits for you into a simple JSON format.
Lpx
You can run lpm projects with lpm x, or lpx as a shorthand registered tool.
This works for git repositories, registry packages, or local paths.
~> lpx cowsay hi
----
< hi >
----
\ ^__^
\ (oo)_______
(__)\ )\/\
||----w |
|| ||You can also install these as tools, to easily reuse them: lpm install cowsay.
How does this compare to Luarocks or Lux?
Refer to the table here.
The biggest difference is that LPM goes for a new simplistic approach to lua package management. Modifying package.path and using filesystem paths for requires, instead of allowing you to add any module requires anywhere which would involve changing package.searchers. This allows you to easily use lpm with love2d, for example.
Additionally, lpm does not currently support luarocks packages. Support will come before 1.0.
Download
Linux & macOS: curl -fsSL https://lualpm.com/install | sh
Windows: irm https://lualpm.com/install.ps1 | iex
Manually: https://github.com/codebycruz/lpm/releases
Note
LPM is still considered a little unstable, hence it has no release on the registry, and no 1.0 release. But I rely on it for my existing projects and it works well for me: https://github.com/codebycruz/arisu https://github.com/codebycruz/hood
3
u/jotapapel Mar 15 '26
Finally a macOS target!
I have a couple of Lua projects I'll rebuild using this tool.
Amazing work!
1
u/jorgerezende Mar 15 '26
Do you provide luarocks package compatibility?
0
u/VidaOnce Mar 15 '26 edited Mar 15 '26
Feel free to ask any questions and contributions are welcome, especially to the docs and MacOS since my ability to test it is limited :p (Test suite and whenever I can rent out a mac)
0
u/AutoModerator Mar 15 '26
Hi! Your code block was formatted using triple backticks in Reddit's Markdown mode, which unfortunately does not display properly for users viewing via old.reddit.com and some third-party readers. This means your code will look mangled for those users, but it's easy to fix. If you edit your comment, choose "Switch to fancy pants editor", and click "Save edits" it should automatically convert the code block into Reddit's original four-spaces code block format for you.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
0
u/AutoModerator Mar 15 '26
Hi! It looks like you're posting about Love2D which implements its own API (application programming interface) and most of the functions you'll use when developing a game within Love will exist within Love but not within the broader Lua ecosystem. However, we still encourage you to post here if your question is related to a Love2D project but the question is about the Lua language specifically, including but not limited to: syntax, language idioms, best practices, particular language features such as coroutines and metatables, Lua libraries and ecosystem, etc.
If your question is about the Love2D API, start here: https://love2d-community.github.io/love-api/
If you're looking for the main Love2D community, most of the active community members frequent the following three places:
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.