Lua 5.3 Reference Manual
by Roberto Ierusalimschy, Luiz Henrique de Figueiredo, Waldemar CelesCopyright © 2015–2018 Lua.org, PUC-Rio. Freely available under the terms of the Lua license.
Standard Libraries
The standard Lua libraries provide useful functions
that are implemented directly through the C API.
Some of these functions provide essential services to the language
(e.g., type
and getmetatable
);
others provide access to "outside" services;
and others could be implemented in Lua itself,
but are quite useful or have critical performance requirements that
deserve an implementation in C (e.g., table.sort
).
All libraries are implemented through the official C API and are provided as separate C modules. Currently, Lua has the following standard libraries:
- 1 – Basic Functions
- 2 – Modules
- 3 – String Manipulation
- 4 – UTF-8 Support
- 5 – Table Manipulation
- 6 – Mathematical Functions (sin, log, etc.)
- 7 – Operating System Facilities
Except for the basic and the package libraries, each library provides all its functions as fields of a global table or as methods of its objects.