Bakeware – Compile Elixir applications into single executable binaries
Compile Elixir applications into single, with out problems distributed executable binaries
Attain you are going to need Journey-envy for how clear-reduce it is to distribute
commandline utilities? Or even your
escript grew too
worthy and you hit a wall with a library that required platform-particular code? Or
that OTP begin looked so clear-reduce to distribute, but a technique or the opposite running untar was as soon as
simplest ample friction to invent somebody complain about your use of Elixir.
Bakeware addresses these disorders by extending Mix
releases with the flexibility
to flip Elixir projects into single binaries that would possibly additionally be copied and straight
urge. No resolve on to set up Erlang or untar recordsdata. The binaries gaze and feel love
the develop-products from diversified languages.
Right here’s a transient listing of recommendations:
- Easy – add the
bakewaredependency and the Bakeware assembler to your Mix
- Helps OSX and Linux (We wrote the code with Windows and the BSDs in thoughts,
so support for these platforms can also no longer be a long way off)
- Zstd compression for little binaries
- Commandline argument passing conveniences
- Hundreds examples
- Stretch aim for SpawnFest: Non-mandatory support for computerized instrument updates
- Executables are 12-15 MB on Linux and 5-7 MB on OSX for straightforward Elixir,
Phoenix, and Scenic apps (Zstd compression enabled)
- Non-scientifically – ~0.5s startup cases or greater on our computers (measured
How does Bakeware work?
Bakeware combines a compressed OTP begin archive with a favorable
platform-particular self-extractor. The self-extractor expands the OTP begin to
a cache on first execution and reuses the cache for subsequent invocations. Due
to the use of Zstd compression, the expansion is terribly swiftly and largely invisible
to the terminate client.
Primarily the most fantastic formula to are trying Bakeware is to clone this repository and are trying out the
Since your entire point of this conducting is to defend a long way from needing to set up Elixir and
and develop the binaries your self, it is doubtless you’ll perhaps presumably secure ones that we built from the
web page. We built them
for 64-bit Linux (we’re the usage of Debian-based OSs) and MacOS. Salvage the tarball
in your platform. The binary names correspond to the examples. Please learn the
README.md‘s for recordsdata on commandline arguments and what to
# E.g., on MacOS, secure and untar bakeware-examples-macos.tgz $ cd MacOS $ ./simple_app Hiya, OTP Utility! Exiting...
Right here’s a list of the projects in this repository:
The following projects contain been a stretch aim of ours. These projects are a client
library and an instance server for automatically updating binaries. The postulate is
that applications can build an voice to a server if an substitute is on the market. If one is, it is
downloaded and the utility is automatically restarted with the new edition.
bakeware_updater– Little Elixir library to envision substitute server
for an accessible substitute, secure it, and notice it to the fresh executable
sous_chef– An instance substitute server for binaries built with Bakeware