Embedding EYG in Erlang programs

This guide adds EYG scripting to an Erlang application my_counters. Just want the code look at example.

Embedding EYG in Erlang gives you a scripting environment with tight controls over what can be accessed. With this control you can:

  • Expose scripting to the users, maybe for small queries or automations
  • Build a safer shell with predefined dev tasks
  • Provide a set of business logic functions to agents

Install dependencies

EYG's toolkit consists of a set of composable parts, for this guide install the following.

Run a pure program

Below is the simplest Erlang module that will run EYG code.