Lua is a lightweight, high-level scripting language built to be embedded inside other programs. It was created in 1993 by a team at PUC-Rio, the Pontifical Catholic University of Rio de Janeiro in Brazil — Roberto Ierusalimschy, Luiz Henrique de Figueiredo and Waldemar Celes — who still maintain it today. The interpreter is written in ANSI C and the whole thing is small: a few hundred kilobytes of source that compiles in seconds and links into a host application as a library. That small footprint, a clean C API and a syntax that non-programmers can pick up in an afternoon are why Lua sits inside so much software people already use, from Redis and Wireshark to Nginx, Neovim and a long list of games. It is free software under the MIT licence, and the current release is Lua 5.5.1 (July 2026), with the 5.4 series still maintained (5.4.9, August 2026).
lua_State, a stack of values, one call to lua_pcall) lets a host program expose its own functions to scripts and call back into them, without changing how the host is built.const and close to-be-closed variables.debug library cover the scripting jobs a host does not want to re-implement.Lua is the cheapest way to add a real programming language to a program you already have. A host application links one small library, registers a handful of C functions, and its users get a scripting environment they can learn in an afternoon — which is exactly what game studios, network tools and editors wanted, and why so many of them chose Lua instead of writing their own. It stays out of the way: no build system to take over, no runtime to ship separately, no large standard library dictating the design. Its portability is unusually broad for a dynamic language, from Linux, macOS and Windows to BSD and firmware-sized targets, and bytecode can be precompiled with luac or dumped with string.dump and loaded from a string or a file. The trade-off is a deliberately small core: everything from JSON to sockets comes from a module, so a project that needs a large standard library may prefer Python or Ruby — but when the goal is a stable, sandboxable extension language inside another product, Lua is still the reference answer.
EVAL) and in Nginx through OpenResty.Install the interpreter from your distribution (sudo apt install lua5.4 on Debian and Ubuntu, brew install lua on macOS, or the binaries from lua.org for Windows) and check it with lua -v. Run a file with lua script.lua, or start the REPL by running lua with no arguments. Modules come from LuaRocks: luarocks install luasocket, with the paths added by eval $(luarocks path). The reference manual at lua.org/manual is the authoritative documentation, and lua -e 'print(_VERSION)' reports the series you are running — the 5.4 shipped by most distributions and the 5.5 series differ in a few details, so read the manual that matches your version.