LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

clx

ahead-of-time Lua compiler to native executables

TLDR

Compile a Lua script to a native executable
$ clx [file.lua]
copy
Compile with custom output name
$ clx [file.lua] --output [name]
copy
Optimize for speed or size
$ clx [file.lua] --size```

Emit **C++ source** only (do not compile)
copy
Produce an object file or static module
$ clx --static [file.lua]```

**Minimal** runtime (base + package modules only)
copy

SYNOPSIS

clx [options] file.lua

DESCRIPTION

clx is a cross-platform ahead-of-time (AOT) Lua compiler and runtime that generates standalone native executables through a modern C++ toolchain (Clang, GCC, or MSVC). It targets Lua 5.5 compatibility and aims for fast startup, deployable binaries, and predictable performance without a bytecode interpreter.Unknown flags are forwarded to the backend C++ compiler (for example -O2). Size-oriented builds can produce compact executables; --minimal links only base and package modules.

PARAMETERS

--output name

Output executable name
--object / --static / --cpp
Emit object file, static library, or C++ source instead of a full executable
--fast / --size / --debug
Optimize for speed, size (default orientation), or debug builds
--minimal
Link only base and package modules
--version / --help
Version or usage

CAVEATS

Dynamic loading (load, dofile, loadfile, string.dump) and full debug support are limited in a pure AOT model. The traditional Lua C API is not supported; native modules use the clx C++ API. The compiler used to build clx is fixed at build time for ABI compatibility with generated code.

SEE ALSO

lua(1), luajit(1)

RESOURCES

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid