Erlang logo

Implementations and Ports of Erlang


Expand All
Contract All

Table of Contents

8 Implementations and Ports of Erlang

8.1  Open Source Erlang

Open Source Erlang is the standard implementation of Erlang. You can use Open Source Erlang to build commercial products without having to pay royalties or licence fees to Ericsson. Open Source Erlang uses the Apache License 2.0.

8.2  What Experimental, Research and Historical Implementations are there?

  • High Performance Erlang (HiPE) is part of ordinary Open Source Erlang. It allows compiling Erlang modules to native code.

  • Erjang is an experimental Erlang VM implemented in Java.

  • Erlang to Scheme Compiler (ETOS). ETOS was 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 was a prototype made by extending an older version of Ericsson's implementation. It was 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

  • BSD

  • Linux

  • Microsoft Windows

  • OSX

  • Solaris

  • TRU64

  • VxWorks

There are reports on the mailing list of other people compiling it successfully on IRIX, along with reports of Erlang running on less usual systems such as iPhones, Xboxes, QNX, 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  Can Erlang be compiled under Microsoft Windows?

HOWTO/ in the source code distribution which explains how to do this.

8.7  How can I cross-compile Erlang?

The standard Erlang/OTP distribution includes support and documentation for cross compiling. This is described in the HOWTO/ file in the Erlang source, available from the downloads page.

8.8  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 moderate 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 persistent 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.