Skip to content

Rocks Devlog #001

Published: at 12:00 AM

A New Moon

Hello and welcome to a series of devlogs about rocks, a modern package manager for Lua which Marc Jakobi and I have been working on over the past few months.

In this first post, I’d like to lay out the rationale and progress made thus far. In the next post, we’ll delve into some meaty technical challenges we faced along the way!

Rationale

Ironically, the motivation for creating a new package manager for Lua stemmed from Neovim, of all places. Marc and I are the developers of rocks.nvim, a better approach to managing plugins for the world’s most loved text editor (according to stackoverflow, at least). To do this, we’ve been using luarocks as the backing package manager for installing and managing plugins packaged as rocks. This has many advantages, most importantly proper dependency resolution and all of the rigor that you get from a fully fledged package manager.

After a few months of using luarocks, we started to encounter a few problems with the package manager deep down in its implementation. No worries, though, we’re happy to fulfill our due diligence as open source developers - we made issues to help track all of the problems down and they were resolved swiftly, lovely!

There are so many problems you can solve by contributing to your favourite FOSS project, you should try it someday! But, it’s not all sunshine and rainbows. After a lot of digging in the core of luarocks, we began noticing things that are simply not fixable with a pull request:

Conveniently enough, we’ve been working on a Rust port of luarocks prior to this already, but our goal was different at the time. We wanted to create a truly embeddable library port, meaning that one could embed something that behaves exactly like luarocks in their own program. We decided to further repurpose this into a full reimplementation, and this is where we are today!

Hello, rocks!

As of writing this post, in just a few months of actual development time, we’ve successfully implemented 80% of luarocks’s existing functionality! You can safely use rocks for basic tasks, although I would seriously wait until our 1.0 release before you use it for anything serious - we’re fleshing out a lot of the user experience.

What’s so fresh and new with our rewrite? We:

Things we have left to do before our 1.0.0 release:

We hope that you’re as excited as we are! Lua is a very barebones language by design, and so a complete and unbreakable package manager is crucial so that users can layer on functionality they need at any time. In the coming posts, I hope to expand on each of the features of our rewrite, discussing how and why our implementation is saner and simpler. See you on the flipside!