This is the standard Lua library. The code of the standard library can be read as an example of how to export C functions to Lua. The easiest library to read is lmathlib.c. The library is implemented entirely on top of the official Lua API as declared in lua.h, using lauxlib.c, which contains several useful functions for writing libraries. We encourage developers to use lauxlib.c in their own libraries.