Installation
Maelstrom consists of a number of different programs. These are covered in more
depth in this chapter. If you just want to give Maelstrom
test-drive, you can start by installing a test runner like
cargo-maelstrom
, maelstrom-go-test
, or
maelstrom-pytest
, and then later add daemon programs for
clustering.
The installation process is virtual identical for all programs. We’ll demonstrate how to install all the binaries in the following sections. You can pick and choose which ones you actual 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, which allows you to pick and choose the binaries you want to install:
cargo binstall maelstrom-run
cargo binstall cargo-maelstrom
cargo binstall maelstrom-go-test
cargo binstall maelstrom-pytest
cargo binstall maelstrom-broker
cargo binstall maelstrom-worker
These commands retrieve the pre-built binaries from the Maelstrom GitHub release page.
If you don’t have cargo-binstall
, you can directly install the pre-built
binaries by simply untarring the release artifacts. 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
Linux on the x86-64 architecture.
The pre-built binaries have shared-library dependencies on libc and OpenSSL.
Installing Using Nix
Maelstrom includes a nix.flake
file, so you can install all Maelstrom binaries with nix profile install
:
nix profile install github:maelstrom-software/maelstrom
The Nix flake doesn’t currently support installing individual binaries.
Installing From Source With cargo install
Maelstrom binaries can be built from source using cargo install
:
cargo install maelstrom-run
cargo install cargo-maelstrom
cargo install maelstrom-go-test
cargo install maelstrom-pytest
cargo install maelstrom-worker
cargo install maelstrom-broker
There is an optional web-ui
feature for maelstrom-broker
, which is off by
default. With this feature enabled, maelstrom-broker
will serve a basic web
UI dashboard. To enable it, some extra dependencies must be installed:
rustup target add wasm32-unknown-unknown
cargo install wasm-opt
cargo install maelstrom-broker --features=web-ui