Lehua

The next generation Luau runtime.

Write Luau, run it right away, and ship a single small executable. Lehua gives you native multithreading, a batteries included standard library, and native DLL support. It is built in Rust for speed and safety.

src/main.luau
--#include[fs]

print("hello from " .. __dirname)

-- run a second file on its own thread
local worker = parallel("./worker.luau")
worker:Push(21)
print(worker:Pop()) -- 42

fs.write("./out.txt", "done")

Why Lehua

Lehua runs Luau like a compiled language. When you are ready, it packs your whole program into one small executable that needs nothing else to run.

๐Ÿ“ฆ

Compiles to one file

Tree shakes your modules and writes a single executable. No runtime to install on the target machine.

๐Ÿงต

Real multithreading

The parallel keyword runs a file on its own thread and its own VM, with a channel to talk to it.

๐Ÿ”Œ

Native DLLs

Call native code with an inject header. Referenced libraries get packed into the final build.

๐Ÿฆ€

Built in Rust

Fast and safe, on top of mlua and tokio, with the Luau native code generator turned on.

Install and build