TL;DR — Quick Summary

mold is a blazingly fast linker that dramatically reduces build times. Drop-in replacement for ld/lld — link C/C++/Rust projects up to 10x faster with zero code changes.

mold links your code 10x faster. Drop it in, rebuild — that’s it.

Installation

# Ubuntu/Debian
sudo apt install mold

# macOS (sold — macOS version)
brew install mold

Usage

# C/C++ with gcc
gcc -fuse-ld=mold main.c -o main

# C/C++ with clang
clang -fuse-ld=mold main.c -o main

# Rust — add to .cargo/config.toml:
# [target.x86_64-unknown-linux-gnu]
# linker = "clang"
# rustflags = ["-C", "link-arg=-fuse-ld=mold"]

# Verify mold was used
readelf -p .comment ./binary

Summary

  • mold links C/C++/Rust binaries 10x faster
  • Drop-in replacement — no code changes
  • Works with gcc, clang, Rust via Cargo
  • Aggressive parallelism and novel design
  • Open source, created by Rui Ueyama