Difference between revisions of "Lua"

From ArchWiki
Jump to navigation Jump to search
(→‎JIT compilation support: -- defined JIT compilation)
(→‎JIT compilation support: described luajit)
Line 14: Line 14:
 
== JIT compilation support ==
 
== JIT compilation support ==
  
[[Wikipedia:Just-in-time compilation|Just-in-time compilation]] is a method of compiling source code at run-time, rather than before.
+
[[Wikipedia:Just-in-time compilation|Just-in-time compilation]] is a method of compiling source code at run-time, rather than before. [https://luajit.org/ LuaJIT] is a drop-in replacement for Lua 5.1. This version is best suited for higher performance constrains.
  
 
+
For JIT compilation support [[install]] the {{Pkg|luajit}} package.
The repositories also offer the [https://luajit.org/ LuaJIT], as {{Pkg|luajit}} which implements the language as version 5.1. This version is best suited for higher performance constrains.
 
  
 
== Modules ==
 
== Modules ==

Revision as of 14:05, 22 March 2019

Lua, according to its own website lua.org, is a powerful, efficient, lightweight, embeddable scripting language. This makes Lua ideal for configuration and extensions of other programs, also because of its great interoperation with C. The basic Lua interpreter is less than 250kB in size. As the official implementation is written in ANSI C it is available for many platforms and architectures.

Installation

There are multiple versions available:

JIT compilation support

Just-in-time compilation is a method of compiling source code at run-time, rather than before. LuaJIT is a drop-in replacement for Lua 5.1. This version is best suited for higher performance constrains.

For JIT compilation support install the luajit package.

Modules

The LuaRocks package manager is available as luarocks, luarocks5.1[broken link: replaced by luarocks] and luarocks5.2[broken link: replaced by luarocks].

Some modules are also available in the official repositories.

See also