Install

Luerl works as a library embedded in a host simple called the embedding program. The host program can invoke functions to execute a piece of Lua code, can write and read Lua variables, and call Erlang functions by Lua code.

Through the use of Erlang, Luerl can be augmented to cope with a wide range of different domains, creating a customized language sharing a syntactical framework.

Installing Luerl

Luerl implement standard Lua 5.3 in pure Erlang to start using the project you need to include the luerl library as new dependency on your OTP application.

Rebar

With Rebar 3, you can either install luerl from hex.pm or from GitHub directly (for more info on Rebar dependencies, see the dependency documentation).

Add luerl as a dependency to your project rebar.config file using one of the two options below.

Hex
{deps, [luerl]}.
GitHub
{deps, [{luerl, {git, "git://github.com/rvirding/luerl.git", {branch, "develop"}}}]}.

Erlang.mk

Or use Erlang.mk to setup quickly your environment, build the code and project release.

Create a Makefile and include luerl to the project dependencies.

DEPS = luerl

Source code

$ git clone https://github.com/rvirding/luerl.git

Getting started

For a quick starting tutorial we're going to use Erlang.mk to setup quickly our environment, build our code and start or stop the project release.

Erlang.mk is very easy to setup: create a folder, put Erlang.mk in it, and write a Makefile:

include erlang.mk

For a step by step:

$ mkdir luerl_demo

$ cd luerl_demo

$ curl https://erlang.mk/erlang.mk -o erlang.mk

Create a Makefile and copy the next code snippet, there you can make the correct changes to reflect your project needs.

PROJECT = ophelia
DEPS = luerl
include erlang.mk

$ make

From that point you can create an src/ folder or start using http://erlang.mk/ templates - User guide.