Programming Languages

Lua Playground

Run Lua 5.3 scripts entirely in JavaScript - no WASM needed.

Runtime: Fengari (pure-JS Lua VM)

About this playground

Lua plays here via Fengari, a pure-JavaScript port of the Lua 5.3 reference interpreter (~200 KB). Standard library is bundled: string, table, math, os, io (stdout) and the usual metatable machinery. Run any Lua script that doesn't need C extensions or filesystem access.

FAQs

Pure JS or WebAssembly?

Pure JavaScript. Fengari is a hand-port of Lua 5.3 - smaller, faster to load and easier to embed than a WASM build.

Will it support all Lua libraries?

Standard library (string, table, math, os, io with stdout, debug subset) is supported. C-extension libraries like LuaSocket or LuaJIT FFI don't - those need a native runtime.

Lua 5.3 vs 5.4?

Fengari implements Lua 5.3, which is the syntax and semantics you'll see in nearly all Lua-using projects (Roblox, Redis 6+, OpenResty).

Other playgrounds