LuaRocks
Original authorHisham Muhammad
DevelopersHisham Muhammad, et al.
Initial releaseAugust 9, 2007; 18 years ago (2007-08-09)
Stable release
3.13.0 / January 28, 2026; 4 months ago (2026-01-28)
Written inLua
Operating systemLinux, macOS, Windows (Cygwin), Solaris, OpenBSD, NetBSD, FreeBSD
TypePackage manager
LicenseMIT License
Websiteluarocks.org Edit this at Wikidata
Repository

LuaRocks is a package manager for the Lua programming language that provides a standard format for distributing Lua modules (in a self-contained format called a "rock"), a tool designed to easily manage the installation of rocks, and a server for distributing them. While not included with the Lua distribution, it has been called the "de facto package manager for community-contributed Lua modules".[1]

The interface for LuaRocks is a command-line tool called luarocks which can install libraries and manage Lua rocks.[2] LuaRocks optionally integrates with Lua run-time loader to help find and load installed rocks while managing version dependencies. Though it is possible to use a private LuaRocks repository, the public repository is most commonly used for rocks management. As of December 2016, there are over 1,500 rocks in the public repository.[3]

The public repository helps users find rocks, resolve dependencies and install them. LuaRocks is compatible with Lua versions 5.1, 5.2 and 5.3, as well as LuaJIT.

History

edit

Development on LuaRocks was started in 2006 by Hisham Muhammad and was released to the public on August 9, 2007.[4]

In 2015, the public repository moved from a static page curated by the tool's developer to a new server written in MoonScript by Leaf Corcoran. Also, LuaRocks development was moved to GitHub in 2010.

Portability

edit

LuaRocks is written in Lua itself, and it is cross-platform. It is available in all major Linux distributions. However, since distribution packages often lag behind the latest release installing the latest release is recommended. When installed from the upstream tarball, LuaRocks can upgrade itself on Unix systems.

For Windows, LuaRocks distributes a package file including LuaRocks, Lua 5.1 and required utilities that are missing in a typical Windows system. The Windows package supports both Microsoft Visual Studio and MinGW compiler suites. For running on Cygwin, the Unix package should be used.

On macOS, LuaRocks is included with the Lua package of the Homebrew package manager. The Unix tarball can also be installed directly on macOS.

LuaRocks has also been reported to work on FreeBSD, OpenBSD, NetBSD and Solaris.[4]

Due to installation issues (permissions needed for system installation, lagging system packages, etc.), there is hererocks, a package available at the Python Package Index that can be installed via pip and provides installations of Lua and LuaRocks into a local directory upon demand.[5]

Projects using LuaRocks

edit

LuaRocks allows installing Lua modules to standard Lua paths as well as to customized locations. For this reason, it is possible to use it to install extensions to any project that uses standard Lua modules, such as the Awesome window manager. Some projects, however, adopted LuaRocks as their recommended solution for managing extensions, integrating it and in some cases, maintaining their own repository of project-specific rocks. Some projects that use LuaRocks in this fashion are:

  • Kong Gateway - an open-source API gateway. Kong uses LuaRocks for building the gateway and supports installing plugins and additional rocks.[6]
  • Torch - Torch, a framework for machine learning, uses LuaRocks for managing its modules. Torch uses its own rocks repository.[7]
  • Tarantool - the Tarantool database uses LuaRocks for managing its extensions.[8]

See also

edit

References

edit
  1. ^ "Lua: Not Your Average Scripting Language". ActiveState Blog. 22 November 2016. Retrieved 9 January 2017.
  2. ^ "Using LuaRocks". LuaRocks wiki. Retrieved 30 December 2016.
  3. ^ "LuaRocks Stats". LuaRocks.org. Retrieved 30 December 2016.
  4. ^ a b "Release history". LuaRocks wiki.
  5. ^ "hererocks". PyPI. Retrieved 2022-05-18.
  6. ^ "(un)Installing your plugin". Kong Gateway - Kong Docs. Retrieved 27 February 2024.
  7. ^ "Rocks for Torch". Torch rocks repository. Retrieved 30 December 2016.
  8. ^ "Tarantool Rocks". Tarantool. Retrieved 30 December 2016.
edit

📚 Artikel Terkait di Wikipedia

Lua

Waldemar. "Lua 5.4 Reference Manual". Lua. Retrieved 1 June 2022. "LuaRocks". luarocks.org. Retrieved 24 May 2009. "Binding Code To Lua". Lua-users wiki

RubyGems

portal Ruby Version Manager Package manager pip (package manager) npm LuaRocks "Release 4.0.14". 10 June 2026. Retrieved 10 June 2026. "174 Rubygems with

Torch (machine learning)

input/output, image processing, and so on. They can be installed with LuaRocks, the Lua package manager which is also included with the Torch distribution

List of software package management systems

tool, also used by sbt Leiningen: a project automation tool for Clojure LuaRocks: a programming library and package manager for Lua Maven: a package manager

Tarantool

X, and FreeBSD. Tarantool can be extended with modules installed using LuaRocks, and it includes its own selection of extension rocks. Gornyy, Alexander

CPAN

repository for Python; RubyGems for Ruby; CRAN for R; npm for Node.js; LuaRocks for Lua; Maven for Java; and Hackage for Haskell. CPAN's use of arbitrated

List of free software project directories

Perl CTAN TeX CRAN R Gambas Software Farm Gambas JBoss Enterprise Java LuaRocks Lua PEAR PHP Node Package Manager Node.js Python Package Index Python Hackage