Compiling Elixir to a single file

Is it possible to compile elixir applications such as a Phoenix application to a single file?

Yes, you can use distillery.

1 Like

Since your question is very vague, perhaps you might want to build an escript instead of using distillery…

If you want to build some kind of command line tool, which you start with arguments and wait for its output or do some user interaction, use an escript. If you want to have something that is running as a demon/service in the background and managed by your init-system (or windows services) then use distillery and OTP releases.


To give more context it is possible to create a single binary that encapsulates all the dependecies and the application logic in Java they are called (UberJars) this is also possible in Go.
@cassiogodinho Thanks Ill look into distillery