LuaRocks is a
package manager
A package manager or package-management system is a collection of software tools that automates the process of installing, upgrading, configuring, and removing computer programs for a computer in a consistent manner.
A package manager deals wi ...
for the
Lua programming language
Lua ( ; from meaning ''moon'') is a lightweight, high-level, multi-paradigm programming language designed primarily for embedded use in applications. Lua is cross-platform, since the interpreter of compiled bytecode is written in ANSI C, ...
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".
The interface for LuaRocks is a
command-line
A command-line interpreter or command-line processor uses a command-line interface (CLI) to receive commands from a user in the form of lines of text. This provides a means of setting parameters for the environment, invoking executables and pro ...
tool called ''luarocks'' which can install libraries and manage Lua rocks. 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.
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
LuaJIT is a Tracing just-in-time compilation, tracing just in time compiler for the Lua (programming language), Lua programming language.
History
The LuaJIT project was started in 2005 by developer Mike Pall, released under the MIT open sourc ...
.
History
Development on LuaRocks was started in 2006 by Hisham Muhammad and was released to the public on August 9, 2007.
In 2015, the public repository moved from a static page curated by the tool's developer to a new server written in
MoonScript
Lua ( ; from meaning ''moon'') is a lightweight, high-level, multi-paradigm programming language designed primarily for embedded use in applications. Lua is cross-platform, since the interpreter of compiled bytecode is written in ANSI C, an ...
by Leaf Corcoran. Also, LuaRocks development was moved to GitHub in 2010.
Portability
LuaRocks is written in Lua itself, and it is
cross-platform
In computing, cross-platform software (also called multi-platform software, platform-agnostic software, or platform-independent software) is computer software that is designed to work in several computing platforms. Some cross-platform software ...
. It is available in all major
Linux
Linux ( or ) is a family of open-source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically packaged as a Linux distribution, w ...
distributions. However, since distribution packages often lag behind the latest release installing the latest release is recommended. When installed from the
upstream
Upstream may refer to:
* Upstream (bioprocess)
* ''Upstream'' (film), a 1927 film by John Ford
* Upstream (networking)
* ''Upstream'' (newspaper), a newspaper covering the oil and gas industry
* Upstream (petroleum industry)
* Upstream (software ...
tar
Tar is a dark brown or black viscous liquid of hydrocarbons and free carbon, obtained from a wide variety of organic materials through destructive distillation. Tar can be produced from coal, wood, petroleum, or peat. "a dark brown or black bi ...
ball, LuaRocks can upgrade itself on
Unix
Unix (; trademarked as UNIX) is a family of multitasking, multiuser computer operating systems that derive from the original AT&T Unix, whose development started in 1969 at the Bell Labs research center by Ken Thompson, Dennis Ritchie, an ...
systems.
For
Windows
Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for ser ...
, 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
MinGW ("Minimalist GNU for Windows"), formerly mingw32, is a free and open source software development environment to create Microsoft Windows applications.
MinGW includes a port of the GNU Compiler Collection (GCC), GNU Binutils for Windows ...
compiler suites. For running on
Cygwin, the Unix package should be used.
On
macOS
macOS (; previously OS X and originally Mac OS X) is a Unix operating system developed and marketed by Apple Inc. since 2001. It is the primary operating system for Apple's Mac computers. Within the market of desktop and lapt ...
, 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 , a package available at the
Python Package Index
The Python Package Index, abbreviated as PyPI () and also known as the Cheese Shop (a reference to the ''Monty Python's Flying Circus'' sketch " Cheese Shop"), is the official third-party software repository for Python. It is analogous to the C ...
that can be installed via
pip and provides installations of Lua and LuaRocks into a local directory upon demand.
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:
*
Torch
A torch is a stick with combustible material at one end, which is ignited and used as a light source. Torches have been used throughout history, and are still used in processions, symbolic and religious events, and in juggling entertainment. I ...
- Torch, a framework for machine learning, uses LuaRocks for managing its modules. Torch uses its own rocks repository.
*
Tarantool - the Tarantool database uses LuaRocks for managing its extensions.
See also
*
RubyGems
RubyGems is a package manager for the Ruby programming language that provides a standard format for distributing Ruby programs and libraries (in a self-contained format called a "gem"), a tool designed to easily manage the installation of gems ...
*
Pip (package manager)
Pip is a package-management system written in Python and is used to install and manage software packages. The Python Software Foundation recommends using pip for installing Python applications and its dependencies during deployment. Pip c ...
*
Npm (software)
npm ( originally short for Node Package Manager) is a package manager for the JavaScript programming language maintained by npm, Inc. npm is the default package manager for the JavaScript runtime environment Node.js. It consists of a command l ...
References
External links
*
Continuous Integration with Lua - Lua.Space
{{DEFAULTSORT:LuaRocks
Free package management systems
Free software programmed in Lua (programming language)
Lua (programming language)