Erlang And Reltool
Updated on 30 Jan 2014 permalink
This is a collection of my notes on Erlang and RelTool.
Starting Out
Erlang Rebar Tutorial: Generating Releases and Upgrades is a great article to introduces creating Erlang releases with Rebar, and comes with an accompanying github repository. While the repository works fine for R14, some changes are required for running with Erlang versions past 14 (you can see them in this commit).
High Performance Erlang (HiPE)
The HiPE module for Erlang is built to attempt to speed up the erlang virtual machine by compiling part of the application and library code into native machine code. One of the issues with HiPE, is that there is currently a bug in HiPE that causes it to get compiled into standard Erlang even if flagged for exclusion. When flagged for exclusion RelTool has trouble generating correct node binaries, because you must tell RelTool to exclude HiPE if you want your application to load correctly.
Add the following in your reltool.config: {app, hipe, [ {incl_cond, exclude} ] }
. If rebar complains that "Application hipe is used in release {your_app} and cannot be excluded"
then either your application, or one of it’s dependencies depends on HiPE, and you need to be using a version of Erlang that was compiled for HiPE support.
A quick way to check if the version of Erlang you are using was compiled with HiPE support is to run the following in the Erlang shell: c("path/to/source/file.erl", [native]).
. Without HiPE support Erlang will warn you that it doesn’t have HiPE support.
Additional note: I’ve been able to find an issue report.
This post will receive additional updates as I progress with Erlang and RelTool.
Previously:
- Postel was Wrong
- Discord Webrtc Logging
- Keybase
- Public Key Change
- A Journal Of History
- Collapsing Contexts
- Cryptography And Backdoors
- Online Personas
- Life On The Internet
- Real Time
- Erlang And Reltool
- Memoization And Meemo
- UW Course Search
- OS 161 Retrospective
- Totp Authentication
- This Site