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-ride, you'll probably just want to install a test runner like
cargo-maelstrom or
maelstrom-pytest.
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:
cargo binstall maelstrom-run
cargo binstall cargo-maelstrom
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 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 maelstrom-run
cargo install cargo-maelstrom
cargo install maelstrom-pytest
cargo install maelstrom-worker
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