The LuaJIT extensions are fully loaded, and can be used globally. The standard Lua libraries are loaded, and are usable. The
require function exists, but isn't recommended as the loading of external DLLs might be difficult to properly accomplish. Loading pure Lua files is fine. The
ffi table is loaded globally, there is no need to
require it, but it'll work nonetheless. As a side-effect of Luv, Lua-compat-5.3 is loaded.
A good portion of ImGui is bound to the Lua environment, and it's possible for the Lua code to emit arbitrary widgets through ImGui. It is advised to consult the user manual of ImGui in order to properly understand how to make use of it. The list of current bindings can be found within the source code. Some usage examples will be provided within the case studies. Additional features and interaction is documented in the rendering page.
For network access and interaction, PCSX-Redux uses libuv internally, and is exposed to the Lua API through Luv, tho its loop is tied to the main thread one, meaning it'll run only once per frame. There is another layer of network API available through the File API, which is more convenient and faster for simple tasks.
The Zlib C-API is exposed through FFI bindings. There is another layer of Zlib API available through the File API, which is more convenient and faster for simple tasks.
The FFI-Reflect library is loaded globally as the
reflect symbol. It's able to generate reflection objects for the LuaJIT FFI module.
The PPrint library is loaded globally as the
pprint symbol. It's a more powerful
The Lua-Protobuf library is available, but not loaded by default. All of its documented API should be usable straight with no additional work. It has been slightly modified, but nothing that should be visible to the user. There is some limited glue between its API and PCSX's.
The luafilesystem library is loaded globally as the
lfs symbol. It's a library that provides access to the filesystem.
The LPeg library is available, but not loaded by default. It's a library that provides a pattern-matching library for Lua, which can be useful to create ad-hoc arbitrary parsers.