What is the bottom bit of the Erlang stack of bits that actually sits on the tin; the Hardware Abstraction Layer?

I am new to all this makefile stuff so please excuse some ignorance. My programming language of choice is “SOLDER” but I am now a retired semi-invalid old phart and have decided to go back to school. I am working on a distributed ML app for small machines.

What is the bottom bit of the Erlang stack of bits that actually sits on the tin; the Hardware Abstraction Layer?

Where do ERTS and BEAM fit in this stack?

Thanks! Tigadad.

5 Likes

Erlang behaves like operating system, but in most cases it will run within another operating system - commonly Linux or other *NIX. So the OS will provide the HAL.

ERTS is short of Erlang Runtime System and is the backbone of the runtime. BEAM is the core of the VM (which is part of the ERTS) and is short of Bjorn Erlang Abstract Machine. This is the form of the byte code and stuff that will interpret the compiled code at the runtime (nowadays with JIT sprinkles on some architectures).

BEAM is like the ecosystem of the languages and utilities while ERTS is specific implementation of the BEAM runtime.

7 Likes

Thank you @hauleth. To put Erlang on bare metal, ie. without an underlying file system, I need to compile the ERTS for the target hardware.

Do I also need to compile BEAM as well or does it sit on the ERTS?

There’s a lot of in-depth information in the BEAM Book’s section on the ERTS.

Given your background, you may also find GRiSP interesting - it uses the BEAM on top of a very thin real-time OS to write Erlang much much closer to hardware than usual.

2 Likes

Thanks @al2o3cr That makes a lot more sense now.