1

I would like to distribute my application that has backend in Elixir to the end user, so it can be run on their own machines. Is there a way to do this so they do not have access to the original source code, but can send me crash reports I can analyze?

asked Oct 23, 2014 at 15:30

1 Answer 1

2

Assuming that Elixir system is developed as a proper OTP application, you could build an OTP release using exrm, and distribute it to clients. Release is stripped of all compile time constructs such as source code or tests.

Basically, you'd need to add exrm as a dependency in mix.exs and then:

mix deps.get
MIX_ENV=prod mix compile --no-debug-info
MIX_ENV=prod mix release

The generated release will reside in rel/your_app_name folder under your project root. It will also contain embedded Erlang runtime in erts-X.Y subfolder. This means that you don't need to have Erlang installed on the target machine, but you need to build a release on an exact copy of it (OS version & arch).

If you remove the erts-X.Y folder, the generated release will still work, but it will require that Erlang is installed on the system and available in path. This makes the release more cross-platform, but less self-contained.

Either way, you don't need to require Elixir on the target machine. Necessary files will be included in the generated OTP release.

Final note: currently exrm doesn't work on Windows (but some work is being done to fix this), so if that's your target OS, you'll need to look for other ways to generate a release.

answered Oct 23, 2014 at 17:27

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.