compilationerlangelixir

Can Elixir or Erlang programs be compiled to a standalone binary?


It says that Elixir has a tool called elixirc and Erlang has a tool called erlc to compile modules for use. It says immediately after this that you can then run code with the elixir command line tool.

Is there a way to compile a binary executable with Elixir or Erlang? (one which I can chmod +x binary_name and then run from the same directory with ./binary_name)


Solution

  • Escripts support that to some extent but you still need Erlang installed in your machine. See this answer for more information: Elixir or Hex portable package format?

    EDIT: In 2023, burrito/bakeware are also valid answers, as mentioned by @Dorian.