Live data from Hacker News

Bakeware: Compile any Elixir application into a single binary

github.com

1–10 of 32 posts

Re: Bakeware: Compile any Elixir application into a single binary

#4
post #3

My holy grail would be to (somehow) create a release on Windows (my dev system) and deploy on Linux (our prod servers). However, I have little hope because of the Erlang binaries requirement. Still, you can always hope :)

You can do this with WSL or Docker, can you not?

Re: Bakeware: Compile any Elixir application into a single binary

#5
post #2

I don't know much about elixir but I'm interested. Are there disadvantages to this process?

I'd assume it's incompatible with LGPL code/libraries (unless it's open source), then again I have no idea how widespread said license is in the Elixir world.

Re: Bakeware: Compile any Elixir application into a single binary

#6
I'm glad Bakeware is applying brainpower to the entry point problem for simple scripts.

I'm currently learning Elixir and the biggest initial hurdle was how to actually create an application. Most tutorials teach you through iex but rarely how to actually write a running program or library.

Things like "mix run" wouldn't work until I created an app with mix new, then I had to visit the rabbit hole of genservers and supervisors, etc...

It's a little complex for beginners and could use some polishing. I can't say that I truly understand it still.

Re: Bakeware: Compile any Elixir application into a single binary

#7
post #4
post #3

My holy grail would be to (somehow) create a release on Windows (my dev system) and deploy on Linux (our prod servers). However, I have little hope because of the Erlang binaries requirement. Still, you can always hope :)

You can do this with WSL or Docker, can you not?

I not really sure I don't use WSL nor docker. Even if it was possible I'd really prefer a native solution...

Re: Bakeware: Compile any Elixir application into a single binary

#8
post #7
post #4

Earlier quoted context omitted.

You can do this with WSL or Docker, can you not?

I not really sure I don't use WSL nor docker. Even if it was possible I'd really prefer a native solution...

WSL is not 'native' per se, but it's very well-integrated with Windows. I'd give it a look, even if it's just writing a script to run a build command in WSL from the same directory you're developing locally in.

Re: Bakeware: Compile any Elixir application into a single binary

#9
post #3

My holy grail would be to (somehow) create a release on Windows (my dev system) and deploy on Linux (our prod servers). However, I have little hope because of the Erlang binaries requirement. Still, you can always hope :)

If all goes to plan, I am planning on sponsoring a bounty to get zig cc to cross-compile erlang this summer. In theory, that should enable what you're looking for.

Re: Bakeware: Compile any Elixir application into a single binary

#10
Can the cpio command extract the Erlang VM from these binaries? If not, then it shouldn't be called cpio. Operating systems have been known to block binaries that have compressed binaries inside them using novel formats tools don't understand. The design here is very similar to ZIP, which would be a good thing to consider, since that would grant the end user the flexibility to copy the app out of the bakeware shell into their existing Erlang install without having another Erlang get installed.
Post reply on HN