wmnnd
The Go vs Elixir thread got me thinking: Would it be too hard to implement a simple mechanism for creating Go-style static app binaries from Distillery Releases?
After all, Releases already bundle all Elixir/Erlang dependencies, so they seem like an ideal starting point.
I suppose, one could come up with an elaborate solution that would implement a custom boot process for the BEAM VM and somehow load all required BEAM files into it.
But why not create a “dumb” binary that is bundled with the release data (think self-extracting archive). It could dump its contents into a temporary folder and runs the app from there. A slightly more elaborate approach would be to use a user-space filesystem (FUSE on Linux) like AppImage does.
Combined with adequate compression, this could produce binaries of around 10 MB.
What do you think?
Trending in Discussions
Other Trending Topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #ai
- #elixirconf-us
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #elixirconf-eu
- #metaprogramming
- #hex











Showing Posts 55 to 46- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
OvermindDL1
Until you loop while calling it.
jeremyjh
Good catch. ODL’s example has to load the compiler. Naked ERTS isn’t so bad.
cdegroot
dimitarvp
That is perfectly fine, having in mind that Erlang / Elixir are aiming at long-running services and servers and not one-off scripts. In that area Go and Rust are hard to beat and that is okay. You don’t need to use Elixir for absolutely everything. It already does quite a lot.
CptnKirk
I wonder what the state of Erlang’s LLVM support is. That’s how the Scala folks are attempting to bring Scala to the CLI world.
NobbZ
No, thats not a CLI application, thats a terminal based application or sometimes seen as TUI application (Text/Terminal User Interface).
CLI means Command Line Interface, so it describes a tool, which you can fully operate through the command line, usually without asking for user feedback, or at least making it optional (eg.
apts--yesswitch orpacmans--noconfirm).axelson
Personally I would call Beats a “CLI app”. It is a ncurses based drum machine and I think that Elixir is well suited to it and I think it would be great if it was possible to easily build it into a binary for running from the command line.
This is what it looks like:
Github: GitHub - mtrudel/beats: Beats is a drum machine · GitHub
Conference talk: https://youtu.be/XN4WuOujr38?t=1102 (video set to load to beats-specific section)
wmnnd
To give a practical example: The command-line client for CloudFoundry for orchestrating your CF deployments is written in Go and can be downloaded as a single binary.
I also created a command-line tool for my software distribution platform DBLSQD. I might have written it in Elixir if there had been a more convenient way of packaging it but there wasn’t, so I went with Node instead.
OvermindDL1
For me I mean things that are quick runs that I manually run from a command line generally stringed with other commands. If it’s something that is long-time running then it should be a service and I start it as such.
CptnKirk
Maybe you should describe what you mean by CLI work. You can start all programs from the command line after all.