8 Implementation and Ports of Erlang

8.1 What Production-quality implementations of Erlang are there?

8.2 What Experimental and Research Implementations are there?

8.3 Which version of Erlang am I running?

Erlang uses different version numbers for different parts of the system, so the message you see when you start Erlang doesn't reveal which release you're using:

        Erlang (BEAM) emulator version 5.1.1 [source]

        Eshell V5.1.1  (abort with ^G)
        

The start script reveals more information:

        Eshell V5.3.6.3  (abort with ^G)
        1> init:script_id().
        {"OTP  APN 181 01","R9C"}
        

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

There are reports on the mailing list of other people compiling it successfully IRIX.

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:

8.5.1 JAM

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

8.5.2 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 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?

Yes, with a moderate amount of effort. There's a fairly detailed writup on the trapexit wiki which covers cross compiling between linux systems.

Patrik Nyblom posted a step-by-step VxWorks cross-compiling guide to the mailing list.

Brian Zhou has posted instructions and a relatively simple patch to erts/configure.in which allows cross compilation for many (most?) linux targets.

8.9 Is Erlang small enough for Pocket PCs?

Various people on the erlang-questions mailing list have reported Erlang running on pocket PCs, including the Sharp Zaurus.

8.10 Is Erlang small enough for embedded systems?

Rule of thumb: if the embedded system can run an operating system like linux, then it is probably 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. flash or hard 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 otp.mk.in and adding +compressed +no_debug_info to the erlang compiler options and then rebuilding all the libraries.