_samt_
Joined 5 years ago
Joined 5 years ago
Yes it's in another thread.
clx provides a simpler, stackless C++ API because it doesn't use the Lua VM.
The Lua C API compatibility layer lets you reuse existing binary modules without rewriting their source code. The wrapper is there for compatibility, not because modules must be written that way.
For new modules, you can use clx's native C++ API directly.
When your application depends on several Lua and binary modules, you may have to compile each binary module, embed the Lua scripts while preserving their expected module paths, link everything against the Lua VM, and write glue/loading code to make everything work together (see the comment below regarding LuaSocket)
Of course, it's possible. But it's a lot of manual work, especially for newcomers.
With clx, the goal is simple: compile your Lua program into a native executable. No stock Lua VM dependency, no glue code, no module-loading code to write.
My point is about deploying standalone applications.
Tools like srlua, luastatic, and many others, package Lua scripts with the interpreter and required libraries. These bundled executables can sometimes trigger antivirus false positives, just like tools such as py2exe for Python. They use packaging techniques that can resemble those used by malware, which is why I called this approach "hacky".
Static linking itself is not a problem for Lua.
If all you want is a tiny script that checks the weather or downloads a file, having to manually link or bundle all those pieces just to ship a standalone executable is a lot of work. That's one of the problems clx aims to solve.
As for AI, I've spent months of my free time building clx. The design and implementation are mine. It's true that I use AI to help with documentation and to debug complex issues, but that doesn't make the project AI-generated.
The release archive currently extracts directly into the working directory. I'll package future releases into a dedicated top-level directory to avoid cluttering the extraction location.