Use Cases
Luerl is an embeddable scripting language: your Erlang/OTP application is the host, and Lua scripts run inside it. Because the whole VM is pure Erlang, it drops into the BEAM with no NIFs, no C toolchain, and no port processes — which makes it uniquely easy to run in a sandbox.
Embedding a scripting language in Erlang/OTP
The classic Luerl use case. Keep the core of your application in Erlang and let users, analysts, or integrations extend it with Lua scripts — configurable rules, filters, and workflows — through the documented Luerl API. Erlang code can call Lua functions and Lua code can call Erlang functions in the same runtime.
Sandboxed execution of untrusted code
Because Luerl runs entirely inside the BEAM, there is no native code to contain. Load Lua code from anywhere and run it in an Erlang process with a strict execution budget, cancel it by killing the process, and let the OTP supervision tree keep your application safe.
Game logic and simulation
Lua is the scripting language of the game industry, and Luerl brings it to the BEAM. It is a natural fit for game servers, agent simulations, and anything that mixes rule-heavy logic with Erlang's concurrency and fault tolerance.
IoT and embedded control
Lua's reputation as a lightweight embedded language carries over. Luerl gives BEAM-based IoT stacks a standards-compliant Lua 5.3 interpreter for device-local scripting and configuration.
AI agent tooling
Luerl is a natural fit as an embedded scripting VM for agents and automation: sandboxed Lua scripts can drive workflows against the BEAM runtime, with the interpreter kept in-process and isolated from the host application.
Language research and teaching
Luerl is a complete, readable implementation of Lua in Erlang — a useful reference for anyone studying language implementation on the BEAM, and a great way to prototype new language ideas with Lua's syntax.
For a practical starting point, see Install and the getting-started guide.