Elixir code runs in the Erlang VM. The ability to invoke Erlang code from within Elixir allows the use of resources from the entire Erlang ecosystem, and since Elixir code is compiled to the same byte code as Erlang code, there is no performance penalty.
It is also possible to include in an Elixir application the Erlang code that is already compiled.
If you take a closer look, the files we compile in IEx sessions have the
.beam extension, and that's exactly the same format Erlang's compiled code gets transformed into.
To use Erlang code in Elixir, we start a new IEx session.
These are some examples of how to invoke Erlang code from Elixir:
Applicationmodule defines a function named