Lua Dialects and Implementations

PUC Lua 5.4 The reference implementation (this course) LuaJIT 2.1 Tracing JIT, Lua 5.1 compatible, FFI Luau (Roblox)

Lua 5.1-derived with gradual typing, performance work, sandboxing, string interpolation, continue, compound assignment (+=). Open source.

A typed dialect of Lua that compiles to Lua (like TypeScript for Lua)

Whitespace-significant, CoffeeScript-like language compiling to Lua (used by Lapis/itch.io)

A MoonScript successor with more features A Lisp that compiles to Lua (macros, zero runtime overhead), popular with Neovim and TIC-80

Lua 5.3 with optional static types and a JIT A typed companion language for Lua that compiles to C (from the Lua team) GopherLua, Shopify's go-lua MoonSharp, NLua, KeraLua

Lua for.NET/C# (MoonSharp is a C# implementation) Lua VM in JavaScript (runs in browsers) mlua, rlua Rust bindings (Module 37) eLua, NodeMCU Lua Embedded/microcontroller Lua Lua 5.4 compiled to WebAssembly

-- Teal example (file.tl): compiled with `tl gen file.tl`
local record Player
    name: string
    hp: integer
end
local function heal(p: Player, amount: integer): Player
    p.hp = p.hp + amount
    return p
end
;; Fennel example
(fn greet [name] (print (.. "Hello, " name)))
(greet "Fennel")