Hacker News new | past | comments | ask | show | jobs | submit login

Well, `mix release` (https://hexdocs.pm/mix/Mix.Tasks.Release.html) exists to address this very issue.

It still has limitations (the biggest one is the requirement for the os&architecture to match between the builder and the deployment target) — but the result is a standalone binary which not only embeds the VM and preloads the app's bytecode, but even "trims" the stdlib to only ship the required functions.




Right, so the moral of the story centers on the target user of the CLI tool. If you're building something for the Elixir community - game on I suppose, though there is still the complexity of build-env per OS/arch.

I wonder where WASM/container enters the discussion.


> Firefly compiles Elixir applications faster and more efficiently than the BEAM can, and introduces WASI targeting to run applications in resource-constrained environments.

https://dockyard.com/blog/2022/09/01/dockyard-r-d-firefly-op...

Containers are already solved, its trivial to build and boot a mix release - but whether that's appropriate for a CLI tool depends on the complexity of the tool I guess, but not too far from flatpaks etc no?


Burrito is supposed to close the gap even further, though I've never used it.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: