Re: [ANN] CLX - Ahead-of-Time Lua 5.5 Compiler
Samir Tine <[email protected]> Mon, 22 Jun 2026 02:05:59 -0700 (PDT)
| Newsgroups | gmane.comp.lang.lua.general |
|---|---|
| Message-ID | <[email protected]> |
Thanks for testing CLX and for your detailed report ! You're absolutely right : CLX currently assumes a consistent toolchain throughout the build process, and the generated code was being linked against a runtime library built with GCC/LTO while the final executable was linked using clang/ld. I'll investigate improving toolchain detection and handling mixed GCC/Clang environments more gracefully. Thanks again for tracking this down. Le lundi 22 juin 2026 à 10:58:03 UTC+2, Pierre Chapuis a écrit : > Nice project. > > FYI on an Arch Linux machine, out of the box, building and trying to use > the result will fail: > > ``` > /usr/bin/ld: /dcs/cwl/git/clx/build/libclx_size.a(runtime.cpp.o): plugin > needed to handle lto object /usr/bin/ld: > /dcs/cwl/git/clx/build/libclx_size.a(runtime.cpp.o): plugin needed to > handle lto object /usr/bin/ld: > /dcs/cwl/git/clx/build/libclx_size.a(openlibs.cpp.o): plugin needed to > handle lto object /usr/bin/ld: > /dcs/cwl/git/clx/build/libclx_size.a(openlibs.cpp.o): plugin needed to > handle lto object /usr/bin/ld: /tmp/lto-llvm-d854bc.o: in function > `luaopen_t(clx::LState*)': > ld-temp.o:(.text._Z9luaopen_tPN3clx6LStateE+0x126): undefined reference to > `clx::LTable::gettable(clx::LValue const&)' /usr/bin/ld: > ld-temp.o:(.text._Z9luaopen_tPN3clx6LStateE+0x1bb): undefined reference to > `clx::call_function(clx::LState*, clx::LValue const&, clx::LValue const*, > unsigned long, char const*, int)' /usr/bin/ld: /tmp/lto-llvm-d854bc.o: in > function `main': ld-temp.o:(.text.main+0x5): undefined reference to > `clx::open(int, char**)' /usr/bin/ld: ld-temp.o:(.text.main+0x10): > undefined reference to `clx::openlibs(clx::LState*)' /usr/bin/ld: > ld-temp.o:(.text.main+0x20): undefined reference to > `clx::close(clx::LState*)' /usr/bin/ld: ld-temp.o:(.text.main+0x6e): > undefined reference to `clx::close(clx::LState*)' /usr/bin/ld: > ld-temp.o:(.text.main+0xcc): undefined reference to > `clx::close(clx::LState*)' clang++: > error: > linker command failed with exit code 1 (use -v to see invocation) > ``` > > That is because it will build will GCC but compile the Lua program with > clang and attempt to link with (GNU) ld. > > Forcing it to use clang / lld for everything works. > > -- > Pierre Chapuis > > On Mon, Jun 22, 2026, at 09:58, Samir Tine wrote: > > That's a fair question. > The goal is not to intentionally exclude Lua features. In fact, CLX > already supports essentially all Lua 5.5 syntax (including global, <const> > and <close>) and most of the standard library. > > The main unsupported areas today are features that fundamentally depend on > runtime code generation or deep interpreter introspection, such as load(), > loadfile(), dofile(), string.dump(), and most of the debug module. > > The traditional Lua C API is also not supported, as CLX uses its own C++ > API designed around the AOT execution model (CLX don't use any stack or VM > internally) > > Apart from these limitations, the goal is full Lua 5.5 compatibility. > > Le lundi 22 juin 2026 à 07:13:02 UTC+2, bil til a écrit : > > Am So., 21. Juni 2026 um 17:17 Uhr schrieb <[email protected]>: > > Support for most Lua 5.5 language features > > Please excuse a "lazy question" (I did not look at your project in > detail, please excuse - currently too much different work): > > Which are the main features your project does NOT support? > > (because you do not like them / you think they are too cumbersome? or > because the produce any severe problems in your project?) > > Am So., 21. Juni 2026 um 17:17 Uhr schrieb <[email protected]>: > > > > 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 > > > > Thank you, > > > > Samir Tine > > > > -- > > You received this message because you are subscribed to the Google > Groups "lua-l" group. > > To unsubscribe from this group and stop receiving emails from it, send > an email to [email protected]. > > To view this discussion visit > https://groups.google.com/d/msgid/lua-l/b37b13c2128d9a27a854da270db19608%40luart.org > . > > > -- > You received this message because you are subscribed to the Google Groups > "lua-l" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > > To view this discussion visit > https://groups.google.com/d/msgid/lua-l/a53347e9-2426-4f64-9dd9-b09b7d3c5b38n%40googlegroups.com > <https://groups.google.com/d/msgid/lua-l/a53347e9-2426-4f64-9dd9-b09b7d3c5b38n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > > -- You received this message because you are subscribed to the Google Groups "lua-l" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/lua-l/6c765e17-6ec4-43a0-9906-82c89e394f33n%40googlegroups.com.