wmnnd

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?

Showing Posts 55 to 46

OvermindDL1

OvermindDL1

Until you loop while calling it. :wink:

jeremyjh

jeremyjh

Good catch. ODL’s example has to load the compiler. Naked ERTS isn’t so bad.

cdegroot

cdegroot

18:15:08 cees@cees-MBP-Linux:~/tmp/foo$ mix escript.build
Generated escript foo with MIX_ENV=dev
18:15:12 cees@cees-MBP-Linux:~/tmp/foo$ time ./foo
hello, world

real	0m0.179s
user	0m0.166s
sys	0m0.056s
dimitarvp

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

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

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 --yes switch or pacmans --noconfirm).

axelson

axelson

Scenic Core Team

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

wmnnd OP

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

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

CptnKirk

Maybe you should describe what you mean by CLI work. You can start all programs from the command line after all.

Where Next? Top

Trending in Discussions Top

AstonJ
As the title says, please share what you’ve been up to with Elixir. Whether that’s been learning it, looking into it, making stuff with i...
2977 94592 917
New
cblavier
Hey there, It’s been more than a year since we started using LiveView as our main UI library and building a whole library of UI componen...
New
mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
heathen
Quite interesting article Google brought me. Didn’t find any mentions about it here. What do you think in general? Would you use togethe...
New
mhanberg
Hi everyone! The first release candidate for the Expert language server project is now available! We’ve published a press release detai...
New
axelson
Hi there! :wave: @frigidcode and I (but mostly him) have been running an Elixir Book club, we’re almost done with Designing Elixir Syste...
New
budgie
A little off-topic, but I feel like people here have a good head on their shoulders. I used to be quite good at making software. Was luc...
New

Other Trending Topics Top

GenericJam
Edit: 2026 May 15 - This post is archived. Mob is alive!! Main docs: mob v0.7.11 — Documentation A bit of explanation for the slightly c...
New
JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
georgeguimaraes
Just published claude-code-elixir, a plugin marketplace for Claude Code with Elixir support. These are the plugins I’ve been using for my...
New
Dmk
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews