2 ms·
I'm a huge fan of Erlang and Elixir, but everytime I need to write a cross platform command line tool, I always have to look at Go or Rust. Is building release
by sntran 5y ago
I'm a huge fan of Erlang and Elixir, but everytime I need to write a cross platform command line tool, I always have to look at Go or Rust. Is building release better now with Elixir? Can I run `mix release` and get a single binary file that I can run on any platform?
- devoutsalsa 5y agoTo my knowledge, unlike Golang, `mix release` doesn't let you compile for any OS + architecture from any OS + architecture.
- d33lio 5y agoYep, you have to build for the architecture you're planning to deploy on.
- digianarchist 5y agoBEAM code should be portable but the runtime is not.
- mikl 5y agoThere’s a couple of approaches to this problem under development: 1. Bakeware “bakes” your application together with the entire Erlang/OTP/Beam/Elixir stack into a single binary. Given the “batteries included” philosophy of OTP, these binaries end up being fairly large, but it works: https://github.com/bake-bake-bake/bakeware https://github.com/bake-bake-bake/bakeware 2. Lumen compiles Elixir, Erlang and friends into WASM. This will in time enable small fast cross-platform static binaries, but it is not done yet: https://getlumen.org/ https://getlumen.org/