# clx - Cross-platform AOT Lua compiler for native executables

Original title: Show HN: Clx – Compile Lua to Native Executables Through C++20

> Hacker News story 48871547 · language: en · submitted 2026-07-11
> Web version: https://zeli.app/story/48871547
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 143 · by [_samt_](<https://news.ycombinator.com/user?id=_samt_>) · 💬 32
[original](<https://github.com/samyeyo/clx>) · [HN discussion](<https://news.ycombinator.com/item?id=48871547>)

## Summary

clx is a modern cross-platform ahead-of-time compiler that transforms Lua scripts into standalone native executables using a C++20 backend. Unlike traditional interpreters, clx eliminates bytecode overhead to deliver predictable performance, fast startup times, and aggressive optimizations via Clang, GCC, or MSVC. Ideal for developers seeking to deploy compact, high-performance Lua applications across Linux, macOS, and Windows without runtime dependencies, clx supports Lua 5.5 features while enabling native module integration through a lightweight C++ API.

## Key quote

> clx is not trying to be the fastest Lua implementation in every workload. Its goal is to provide ahead-of-time native compilation, deployable standalone executables, predictable runtime performance, and fast startup times.

## HN discussion (32 comments)

### [valorzard](<https://news.ycombinator.com/item?id=48941777>)

> Does the backend output c++20? 
>
> If so, why? I’m curious what specific features you guys are using from c++20.
>
> Have c++20 coroutines been useful at all?

### [corysama](<https://news.ycombinator.com/item?id=48942758>)

> Anyone know if there’s still a community around https://github.com/snabbco/snabb ? This seems like something they would appreciate.
>
> Besides that, first use case that comes to mind is that gamedev likes Lua but iOS does not like LuaJit in JIT mode.

### [1vuio0pswjnm7](<https://news.ycombinator.com/item?id=48949581>)

> FYI
>
> https://github.com/samyeyo/clx/releases/download/v0.2.0/clx-...
>
> Extracts to current directory instead of clx-linux-x86_64

### [jxndbdbd](<https://news.ycombinator.com/item?id=48943505>)

> Interesting project! I have not looked to closely at the source so forgive me for asking
>
> \- Are you doing a source to source or byte code to source transformation?
>
> \- How are you beating lua performance, since the naive implementation of a dynamic language would require tons of tables with pointer chasing

### [skimmed_milk](<https://news.ycombinator.com/item?id=48944730>)

> This is cool, it could be a neat way to get Love2d games on the web with wasm

---

## Cite

- Page: https://zeli.app/story/48871547
- Date: 2026-07-11
- Source: github.com (https://github.com/samyeyo/clx)
- Hacker News: https://news.ycombinator.com/item?id=48871547

## Other languages

- zh: https://zeli.app/zh/story/48871547 · markdown: https://zeli.app/zh/story/48871547.md
- ja: https://zeli.app/ja/story/48871547 · markdown: https://zeli.app/ja/story/48871547.md
- ko: https://zeli.app/ko/story/48871547 · markdown: https://zeli.app/ko/story/48871547.md
- de: https://zeli.app/de/story/48871547 · markdown: https://zeli.app/de/story/48871547.md
- es: https://zeli.app/es/story/48871547 · markdown: https://zeli.app/es/story/48871547.md
