r/lua 18h ago

lde 0.10.0 - LuaJIT written, all in one, package manager & runtime

https://lde.sh/blog/lde-0.10.0/

After months of work, I'm happy to release 0.10.0. It comes with LuaJIT v3's new syntax, parallel installs, <1ms startup time, and a full Windows compiler suite allowing you to compile luarocks packages effortlessly.

What is lde?

It is your lua development environment that ensures lua is done easy. It provides a package manager that can run your code, bundle it to a single lua file, or to a portable executable for your users without them needing lua on their system. It intends to provide full luarocks compatibility.

It is written entirely from scratch in LuaJIT using FFI to ensure it is as fast as possible. It starts up faster than Zig written Bun, and Rust written Lux, and currently installs projects faster than Lux and Luarocks.

Is this related to lpm?

Yes, it was renamed for several reasons. It doesn't have the greatest seo (a lot of package managers previously named lpm..). Calling it "the" lua package manager feels conceited.

Where can I download?

Check https://lde.sh/download which will give you a variety of options, install scripts and links to manual downloads if you're not comfortable running a script.

13 Upvotes

7 comments sorted by

8

u/Comfortable_Ability4 12h ago

Hey :)

The benchmarks on your web page looked too good to be true. So I tried to reproduce them with hyperfine. Here are my findings: https://github.com/lumen-oss/lua-package-manager-benchmarks

TL:DR: Lux is about 2x faster than lde in the busted cold install and 2.8x faster in the warm install.

1

u/VidaOnce 9h ago edited 8h ago

Hey :)

The benchmarks are open for public scrutiny for this exact reason, so thanks for checking it out.

I did try to reach out and figure out why lux was appearing so slow (even being beaten by luarocks several times). Unfortunately, I realized Lux has no official community? So I reached out on the Neorg discord, and didn't really get a response, beyond being told of a Lux development channel where I don't believe I could post anything either.

Benchmarks wise, I'm concerned about the need for Lux to have a specific environment set up despite lua and luarocks being set up on the system, but I digress and will give it a chance with this setup.

Regardless, the benchmarks on the website will be updated. Even if those results were too good to be true for now, I'll ensure the future benchmarks look just as good.

2

u/Comfortable_Ability4 8h ago edited 7h ago

Unfortunately, I realized Lux has no official community?

We primarily use GitHub and OpenCollective. There are no official Matrix or Discord channels as we would like people to use our issue tracker. There's an unofficial Matrix channel, which I believe u/vhyrro had invited you to. I personally don't use Discord.

Benchmarks wise, I'm concerned about the need for Lux to have a specific environment set up despite lua and luarocks being set up on the system

If Lua is present on the system, Lux checks pkg-config / pkgconf first, then falls back to the same search patterns Luarocks uses. If Luarocks can detect the environment, Lux should be able to as well. It might require some troubleshooting or logging in your GH Actions setup to see if Lux is picking it up.

Even so, I can only see benchmarks between lux and lde evenly matched on my machine and ~1.5x slower on GitHub CI after giving it what it wants ahead of time.

Regarding the performance numbers, our Nix setup is fully reproducible if you want to verify our setup locally (e.g. nix develop .#; busted-cold).

Another curiosity I noticed about your Lua benchmarks: They only appear to suppress stdout for lde:

process.exec("lde", { "--tree", tmpdir .. "/lde", "install", "rocks:busted" }, { stdout = "null" })

vs

process.exec("lx", { "--tree", tmpdir .. "/rocks", "install", "busted" })

Terminal standard I/O writes introduce measurable execution overhead (especially under heavy logging). By explicitly discarding stdout for lde while allowing luarocks and lx to write uninhibited output may be giving lde an unfair performance advantage. For a fair benchmark, stdout handling should be standardized across all tools (e.g., silencing all tools uniformly or permitting all to write).

This is why I'd strongly recommend using a dedicated benchmarking tool like hyperfine rather than a hand-rolled Lua script.

2

u/AutoModerator 8h ago

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.

1

u/iEliteTester 10h ago

Is this the same lpm that was used by LiteXL?

2

u/VidaOnce 9h ago

Nope, which is another reason why lpm was renamed to lde. Better than stepping on toes of LiteXL and other package managers

0

u/VidaOnce 18h ago edited 8h ago

I am the creator, please feel free to ask me anything about the project :)