Installation

Maelstrom consists of the following binaries:

  • cargo-maelstrom: A Rust test runner. This can be run in standalone mode — where tests will be executed on the local machine — or in clustered mode. In standalone mode, no other Maelstrom binaries need be installed, but in clustered mode, there must be a broker and some workers available on the network.
  • maelstrom-broker: The Maelstrom cluster scheduler. There must be one of these per Maelstrom cluster.
  • maelstrom-worker: The Maelstrom cluster worker. This must be installed on the machines in the cluster that will actually run jobs (i.e. tests).
  • maelstrom-run: A Maelstrom client for running arbitrary commands on a Maelstrom cluster. While this binary can run in standalone mode, it's only really useful in clustered mode.

The installation process is virtually identical for all binaries. We'll demonstrate how to install all the binaries in the following sections. You can pick and choose which ones you actually want to install.

Maelstrom currently only supports Linux.

Installing From Pre-Built Binaries

The easiest way to install Maelstrom binaries is to use cargo-binstall:

cargo binstall cargo-maelstrom
cargo binstall maelstrom-worker
cargo binstall maelstrom-broker
cargo binstall maelstrom-run

These commands retrieve the pre-built binaries from the Maelstrom GitHub release page. If you don't have cargo-binstall, you can just manually install the binaries from the releases page. For example:

wget -q -O - https://github.com/maelstrom-software/maelstrom/releases/latest/download/cargo-maelstrom-x86_64-unknown-linux-gnu.tgz | tar xzf -

This will download and extract the latest release of cargo-maelstrom for x86 Linux.

Installing Using Nix

We have a nix.flake file, so you can install all Maelstrom binaries with something like:

nix profile install github:maelstrom-software/maelstrom

Our Nix flake doesn't currently have the ability to install individual binaries.

Installing From Source With cargo install

Maelstrom binaries can be built from source using cargo install:

cargo install cargo-maelstrom
cargo install maelstrom-worker
cargo install maelstrom-run

However, maelstrom-broker requires some extra dependencies be installed before it can be built from source:

rustup target add wasm32-unknown-unknown
cargo install wasm-opt
cargo install maelstrom-broker