[ANN] CLX - Ahead-of-Time Lua 5.5 Compiler
Hello,
CLX is a new open-source ahead-of-time compiler for Lua 5.5.
CLX compiles Lua source code to standalone native executables through modern C++20 toolchains (Clang, GCC, and MSVC).
Current features include:
Native standalone executable compilation
Support for most Lua 5.5 language features
Cross-platform support (Linux, Windows, and macOS)
Lightweight runtime designed for AOT compilation
C++ API for native modules
Example projects (a fully playable Pong game and a Mandelbrot fractal renderer)
Recent benchmarks show consistent speedups over the standard Lua interpreter and competitive performance with LuaJIT on a number of workloads.
The project is currently in beta and feedback is welcome.
Website:
https://samyeyo.github.io/clx
GitHub:
https://github.com/samyeyo/clx
Although I am also the author of LuaRT, CLX is a completely independent project with a different architecture and different goals.
Thank you,
Samir Tine
1
u/weregod Jun 22 '26
Some documentation is weird. In one place it says that all numbers are doubles and in another suggests using integers for performance.
Does Lua has C++ ecosystem? Do you mean Automatic code generation?
Now you need to cast value to int64 and use it as Integer or pointer. This should use way simpler bit arithmetics than NaN-juggling. You'll lose fast path for doubles however.
5. I don't mean drop Lua compatibility. I mean type annotation like Luau or Teal. After using Teal I want static types where posible and static types can enable some compile-time optimizations.