Toolchain Support
In order to bundle Lua code into native executables or libraries, lrc generates C code under the hood. So the only required dependencies of lrc are Lua development files and a C compiler!
The following C toolchains are supported:
GCC
gcc or any C compiler compatible with the GNU compiler command-line interface should work together with lrc.
Note that lrc makes use of several tools from binutils, which are included in most gcc-setups.
MSVC
On Windows, the Microsoft Visual C-compiler (cl) is supported by lrc.
It is included in the Tools for Visual Studio (or Visual Studio) and can be used together with lrc from a Visual Studio Developer Command Prompt.
lrc also works with MinGW and MSys2. In this case you can compile using the GCC toolchain available through your MinGW or MSys2 package manager (e.g. pacman).
Clang
The Clang toolchain should work the same as GCC. Note that binutils are required to bundle and compile Lua code using lrc.
Zig CC
In order to compile with Zig’s GCC drop-in replacement, run lrc with the standard environment variables CC and CXX set to CC="zig cc" and CXX="zig c++".
More Toolchains
Added in
lrc 1.2.0
Since v1.2 lrc can be extended with custom toolchains. To learn more, take a look at Hacking the LRocket Compiler.
Lua Headers
Next to a C compiler of your choice, these are the only thing required in order to use lrc for the compilation of native executables and libraries.
On Linux and MinGW/MSys2 these are usually available through your package manager (e.g. apt-get install liblua5.x-dev or pacman -S lua5.x). Optionally, install pkg-config in the case lrc should fail to find your Lua installation.
On Windows and other operating systems it is recommended to get a Lua package from https://luabinaries.sourceforge.net/. These include all necessary development files.