LuaRocks
{{Short description|Package manager for Lua}}
{{Multiple issues|
{{notability|Products|date=December 2016}}
{{primary sources|date=December 2016}}
}}
{{Infobox software
| name = LuaRocks
| logo =
| screenshot =
| caption =
| author = Hisham Muhammad
| developer = Hisham Muhammad, et al.
| released = {{start date and age|2007|08|09}}
| latest release version = 3.10.0
| latest release date = {{start date and age|2024|02|27}}
| latest preview version =
| latest preview date =
| programming language = Lua
| operating system = Linux, macOS, Windows (Cygwin), Solaris, OpenBSD, NetBSD, FreeBSD
| platform =
| language =
| genre = Package manager
| license = MIT License
| website = {{Official URL}}
}}
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".{{cite web|title=Lua: Not Your Average Scripting Language|url=http://www.activestate.com/blog/2016/11/lua-not-your-average-scripting-language|website=ActiveState Blog|date=22 November 2016 |accessdate=9 January 2017}}
The interface for LuaRocks is a command-line tool called luarocks which can install libraries and manage Lua rocks.{{cite web|title=Using LuaRocks|url=https://github.com/luarocks/luarocks/wiki/Using-LuaRocks|website=LuaRocks wiki|accessdate=30 December 2016}} 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.{{cite web|title=LuaRocks Stats|url=https://luarocks.org/stats|website=LuaRocks.org|accessdate=30 December 2016}}
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
Development on LuaRocks was started in 2006 by Hisham Muhammad and was released to the public on August 9, 2007.{{cite web|title=Release history|url=https://github.com/luarocks/luarocks/wiki/Release-history|website=LuaRocks wiki}}
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
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.
Due to installation issues (permissions needed for system installation, lagging system packages, etc.), there is {{code|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.{{cite web |title=hererocks |work=PyPI |url=https://pypi.org/project/hererocks/ |access-date=2022-05-18}}
Projects using LuaRocks
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.{{cite web|title=(un)Installing your plugin|url=https://docs.konghq.com/gateway/3.6.x/plugin-development/distribution/|website=Kong Gateway - Kong Docs|accessdate=27 February 2024}}
- Torch - Torch, a framework for machine learning, uses LuaRocks for managing its modules. Torch uses its own rocks repository.{{cite web|title=Rocks for Torch|url=https://github.com/torch/rocks|website=Torch rocks repository|accessdate=30 December 2016}}
- Tarantool - the Tarantool database uses LuaRocks for managing its extensions.{{cite web|title=Tarantool Rocks|url=https://tarantool.org/rocks.html|website=Tarantool|accessdate=30 December 2016}}
See also
References
{{Reflist}}
External links
- {{Official website}}
- [http://lua.space/general/ci-with-lua Continuous Integration with Lua - Lua.Space]
- [http://leafo.net/guides/customizing-the-luarocks-tree.html Using LuaRocks to install packages in the current directory]
{{Lua programming language}}
{{DEFAULTSORT:LuaRocks}}
Category:Free package management systems
Category:Free software programmed in Lua (programming language)