Installation

A Gleam installation is made up of two parts: The Gleam compiler, and the Erlang runtime.

Installing the compiler

Build from source

The compiler is written in the Rust programming language and must be build from source. Install the Rust compiler before proceeding.

# Download the Gleam source code git repository
cd /tmp
git clone https://github.com/lpil/gleam.git
cd gleam

# Build the Gleam compiler. This will take some time!
make install

# Verify the compiler is installed
# Prints "gleam $VERSION"
gleam --version

Linux

Arch Linux

Gleam is available through the Arch User Repository as package gleam. You can use your prefered helper to install it or clone it for manual build from https://aur.archlinux.org/gleam.git.

Installing the Erlang runtime

Gleam compiles to Erlang code, so Erlang needs to be installed to run Gleam code.

Precompiled builds for many popular operating systems can be downloaded from the Erlang solutions website,

Guides for installing Erlang on specific operating systems can be found below, as well as information on installing multiple versions of Erlang at once using version manager tools.

Once Erlang has been installed you can check it is working by typing erl -version in your computer's terminal. You will see version information like this if all is well:

$ erl -version
Erlang (SMP,ASYNC_THREADS,HIPE) (BEAM) emulator version 10.1

Linux

Debian Linux

sudo apt-get update
sudo apt-get install erlang

Ubuntu Linux

sudo apt-get update
sudo apt-get install erlang

Mac OS X

Using Homebrew

With Homebrew installed run the following:

brew update
brew install erlang

Windows

Using Chocolatey

With Chocolatey installed on your computer run the following:

choco install erlang

Using version managers

asdf

The asdf version manager has a plugin for installing Erlang. Installation and usage instructions can be found here: