Trying to integrate Elixir compiler in Erlang rebar3 project


I am trying to integrate Elixir compiler in my Erlang rebar3 project
The project is an attempt to make BEAM (VM) more approachable by providing an engine with simple semantics to (re)load custom functions (via websocket or disk/network load).

I am not familiar with Elixir much and need some pointers to achieve the same.



What specific problems are you having accomplishing your goals? What have you tried when attempting to overcome them?


In a project I work on that used and rebar2 (for dependency and release building) I just replaced those two with mix and distillery. That required migration from .app.src to proper mix.exs and rel.config to distillery format, however I’m really glad with the improvements that the switch caused. The project is structured as umbrella, and has a lot of inter-project dependencies, and during the switch I found that some dependencies were missing in app files and with mix that was much more visible than in the previous environment.

Another benefit in such a switch was that I had to write a couple of compilers as our Erlang codebase depends on those:

The erlydtl compiler revealed a bug in a template, that was previously simply ignored by

So now I’m really happy I can use all the tools Elixir environment provides in addition to the standard Erlang ones.


I added elixir repo in rebar.config but that failed. Not sure if that is the correct way to proceed. I was hoping that it would be something standard but I somehow was unable to find that in any doc/wiki.

I will post the failures later (don’t have access to system at present).



Thanks for the info. I would want to stick with rebar3, so if rebar3 can integrate somehow with them then it will be great.



Mix has built in support for rebar(3) and can compile erlang files in your project so I would recommend using that. If you prefer to use rebar3 then you have to use a plugin to add elixir support, the rebar3 docs recommend


I will look at both the alternatives.



Although the rebar3 plugin is used for importing Elixir libraries into Erlang project, I wanted to embed the Elixir compiler itself. I ended up using some trickery of rebar3 (somewhat hackish to get Elixir to build). Now my project beamparticle supports Erlang, Elixir (yay!) and Efene.