FFI bindings to the Lua API.