Installation
One-Line Install (recommended)
curl -fsSL https://raw.githubusercontent.com/utensils/mold/main/install.sh | shDownloads the latest tagged release from github.com/utensils/mold/releases/latest and installs it to ~/.local/bin/mold. On Linux, the installer auto-detects your NVIDIA GPU architecture (RTX 40-series or RTX 50-series). macOS builds include Metal support.
Options
All options are passed as environment variables:
# Install to a custom path
curl -fsSL ... | MOLD_INSTALL_DIR=/usr/local/bin sh
# Pin to a specific release tag (default: latest)
curl -fsSL ... | MOLD_VERSION=v0.10.0 sh
# Force a GPU architecture (default: auto-detect on Linux)
curl -fsSL ... | MOLD_CUDA_ARCH=sm120 sh # Blackwell (RTX 50-series)
curl -fsSL ... | MOLD_CUDA_ARCH=sm89 sh # Ada (RTX 40-series)Note: the env var has to be on the
shside of the pipe — withVAR=value curl ... | sh, the variable only applies tocurland the installer itself still sees the default.
MOLD_VERSION accepts any tag that exists on the releases page — for example v0.8.0 to reproduce an older install. Without it the script follows the releases/latest redirect on GitHub and installs whatever that currently points at.
Updating
mold update # Update to latest release
mold update --check # Check for updates without installing
mold update --version v0.7.0 # Install a specific versionOr re-run the install script:
curl -fsSL https://raw.githubusercontent.com/utensils/mold/main/install.sh | shArch Linux / AUR
Three packages on the AUR:
paru -S mold-ai-bin # Prebuilt binary, CUDA sm_89 (RTX 40-series). Fastest.
paru -S mold-ai # Builds from source — for Blackwell, prefix CUDA_COMPUTE_CAP=120
paru -S mold-ai-git # Builds from main HEADSubstitute yay, pikaur, or any other AUR helper as appropriate. With vanilla makepkg:
git clone https://aur.archlinux.org/mold-ai-bin.git
cd mold-ai-bin
makepkg -siConflict with extra/mold: All three packages declare conflicts=('mold') because they install /usr/bin/mold — the same path used by the rui314 linker. You cannot have both installed simultaneously. If you need the linker for your build toolchain, install mold via Nix or the one-line installer (which targets ~/.local/bin) instead.
Blackwell (RTX 50-series): The mold-ai-bin package ships the sm_89 (Ada) tarball. For sm_120 (Blackwell) use the source PKGBUILD with an explicit compute capability:
CUDA_COMPUTE_CAP=120 paru -S mold-aiTo upgrade: paru -Syu mold-ai-bin (or mold-ai / mold-ai-git). mold update will detect a pacman-managed install and direct you here instead of attempting to overwrite the binary.
To uninstall: sudo pacman -R mold-ai-bin (or whichever package you installed).
Nix
# Run directly — no install needed
nix run github:utensils/mold -- run "a cat"
# Blackwell / RTX 50-series
nix run github:utensils/mold#mold-sm120 -- run "a cat"
# Add to your system profile
nix profile install github:utensils/moldFrom Source
./scripts/ensure-web-dist.sh && cargo build --profile dev-fast -p mold-ai --features cuda./scripts/ensure-web-dist.sh && cargo build --profile dev-fast -p mold-ai --features metalcargo build --release -p mold-ai --features cudacargo build --release -p mold-ai --features metalRequires Rust 1.85+ and CUDA toolkit (Linux) or Xcode (macOS).
Optional features can be added to the same build, for example --features cuda,preview,expand,discord,tui or --features metal,preview,expand,discord,tui if you also want terminal preview, local prompt expansion, the Discord bot, or the interactive TUI.
dev-fast is the repo's local-iteration profile: it keeps debuginfo, enables incremental compilation, and uses thin LTO plus more codegen units so optimized builds stay much faster than the shipping --release profile.
Docker
docker pull ghcr.io/utensils/mold:latest
docker run --gpus all -p 7680:7680 ghcr.io/utensils/mold:latestSee Docker & RunPod for full deployment instructions.
Pre-Built Binaries
The one-line installer always targets the latest tag from the releases page. Each release ships the following assets:
| Platform | File |
|---|---|
| macOS Apple Silicon | mold-aarch64-apple-darwin.tar.gz |
| Linux x86_64 (Ada, RTX 4090 / 40-series) | mold-x86_64-unknown-linux-gnu-cuda-sm89.tar.gz |
| Linux x86_64 (Blackwell, RTX 5090 / 50-series) | mold-x86_64-unknown-linux-gnu-cuda-sm120.tar.gz |
To install an older tag, put MOLD_VERSION=<tag> on the sh side of the pipe, e.g. curl -fsSL ... | MOLD_VERSION=v0.8.0 sh. Placing it on the curl side (VAR=value curl ... | sh) exports the variable to curl only; the installer still sees the default and installs the latest release.
Shell Completions
source <(mold completions bash) # bash
source <(mold completions zsh) # zsh
mold completions fish | source # fish