Frequently Asked Questions about Erlang

8 Implementation and Ports of Erlang

8.1  What Production-quality implementations of Erlang are there?

  • Open Source Erlang is the most popular implementation. It is built from the same source tree as the commercial version of Erlang. You can use Open Source Erlang to build commercial products without having to pay royalties or licence fees to Ericsson.

  • Ericsson's Commercial Erlang. This is essentially the same as Open Source Erlang. The main differences are:

    • Commercial Erlang comes with a support agreement

    • The OTP team go to greater lengths to test the commercial release, so you get a more stable product. Similarly, they make the transition between versions smoother.

    • The commercial version includes some encryption-related code which cannot be provided in the open source release for legal reasons.

    • The commercial release does not contain applications which are considered experimental or unstable.

8.2  What Experimental and Research Implementations are there?

  • High Performance Erlang (HiPE). HiPE is an in-progress project to create a faster Erlang by compiling to native code. Since R8A, the HiPE compiler is tightly integrated with the normal BEAM system; if you have downloaded open source erlang, then you also have HiPE. A presentation at the EUC 2001 described how to use it.

  • Erlang to Scheme Compiler (ETOS). ETOS is another research project to compile Erlang programs to native code by first translating the program into scheme. They have some impressive benchmarks. ETOS is no longer under active development.

  • Geoff's Erlang (GERL) supported a subset of the Erlang language. GERL compiled to native code via C. GERL has fallen into disuse.

  • Safe Erlang, which is a prototype made by extending an older version of Ericsson's implementation, is intended for applications where Erlang nodes must cooperate with other Erlang nodes which are not trusted. Safe Erlang is no longer under active development.

8.3  Which version of Erlang am I running?

The easiest way to tell is to look at the banner Erlang prints at startup, e.g.

        Erlang/OTP 17 [RELEASE CANDIDATE 1] [erts-6.0] [source] [64-bit] [smp:2:2] [async-threads:10] [hipe] [kernel-poll:false]

From Erlang code, in recent releases, call erlang:system_info(otp_release) to find out which release you are running.

8.4  What operating systems does Erlang run on?

Erlang runs on most unix and unix-like systems and on the currently popular flavours of windows. Ericsson have compiled it for

  • Solaris (including 64 bit)

  • BSD

  • Linux

  • OSX

  • TRU64

  • Windows NT/2000/2003/XP/Vista

  • VxWorks

There are reports on the mailing list of other people compiling it successfully IRIX, along with reports of Erlang running on less usual systems such as iPhones, Xboxes Tilera 64-core CPUs and many embedded systems.

8.5  What implementations of the Erlang Virtual Machine are there?

Almost everyone uses "the new BEAM", where BEAM stands for Bogdan/Björn's Erlang Abstract Machine. This is the virtual machine supported in the commercial release.

The other virtual machines are of mostly historical interest:


This was the original Erlang virtual machine, inspired by the (Prolog) WAM. JAM stands for "Joe's Abstract Machine".

old BEAM

This was an attempt to compile Erlang to C, and then compile the C to native code. It was abandoned after benchmarking showed that the resulting code was only faster than VM-based Erlang for small programs.

8.6  Is there an unofficial port for...?

MacOS X: Releases since R9B compile on MacOS X.

QNX: Vlad Dumitrescu has looked at porting to QNX. If you're interested, ask on the erlang mailing list.

VxWorks: VxWorks support is included in the standard distribution.

8.7  Can Erlang be compiled under Microsoft Windows?

There is a README.win32 file at the top of the source code distribution which explains how to do this.

8.8  Can Erlang be cross compiled?

From release R13B04 (released February 2010) onwards, the standard Erlang/OTP distribution includes support and documentation for cross compiling. This is described in the file at the top of the Erlang source, available from the downloads page.

Releases prior to R13B04 can also be cross-compiled with a moderate amount of effort. There's a fairly detailed writeup on the trapexit wiki which covers cross compiling between linux systems.

8.9  Is Erlang small enough for embedded systems?

Many people run Erlang on many different types of embedded systems such as mobile telephones, telecommunication switching equipment and in-car electronics.

Rule of thumb: if the embedded system can run an operating system like linux, then it is possible to get current implementations of Erlang running on it with a reasonable amount of effort.

Getting Erlang to run on, say, an 8 bit CPU with 32kByte of RAM is not feasible.

People successfully run the Ericsson implementation of Erlang on systems with as little as 16MByte of RAM. It is reasonably straightforward to fit Erlang itself into 2MByte of persistant storage (e.g. a flash disk).

A 2MByte stripped Erlang system can include the beam emulator and almost all of the stdlib, sasl, kernel, inets and runtime_tools libraries, provided the libraries are compiled without debugging information and are compressed:

  compile:file("foo", [compressed,no_debug_info]).

This can be automated by editing and adding +compressed +no_debug_info to the erlang compiler options and then rebuilding all the libraries.