Speed up C++ or Rust build loops by swapping in mold with a single compiler flag, with no other code changes.
Cut CI pipeline link times for large projects like Clang or Chromium from minutes to seconds.
Use mold -run to intercept linker calls in an existing build system without editing build scripts.
| rui314/mold | yhirose/cpp-httplib | coatisoftware/sourcetrail | |
|---|---|---|---|
| Stars | 16,482 | 16,474 | 16,452 |
| Language | C++ | C++ | C++ |
| Setup difficulty | moderate | easy | moderate |
| Complexity | 2/5 | 2/5 | 3/5 |
| Audience | developer | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
Requires building from source with CMake and a C++20 compiler, or installing from a package manager on supported distros.
mold is a faster drop-in replacement for the Unix linkers that almost every C, C++ and Rust program quietly depends on. To understand what a linker is, it helps to remember that building a compiled program happens in two phases: first a compiler turns each source file into an intermediate object file, then a linker stitches all those object files together into a single executable or shared library. For large projects the linker step can take many seconds or even minutes every time you rebuild, which is painful during the quick edit-rebuild-test cycles developers do while debugging. mold's pitch is that it does this second phase several times faster than existing linkers. A benchmark table shows that linking large programs like MySQL, the Clang compiler and Chromium takes mold under two seconds on a simulated 32-thread machine, compared with tens of seconds for the traditional GNU linker. The README notes that mold is so fast it is only about twice as slow as just copying the file with cp. It supports a long list of processor architectures including x86-64, ARM64, ARM32, RISC-V variants, PowerPC variants, s390x, LoongArch, SPARC64, m68k and SH-4. Someone would install mold to shorten build wait times on a compiled project, especially during rapid debug-edit-rebuild loops or in continuous integration. The README explains how to make a compiler use mold via flags like -fuse-ld=mold for Clang and recent GCC, gives recipes for Rust, Nim and the Conan package manager, and describes a mold -run wrapper that intercepts linker calls without changing build settings. mold itself is written in C++20 and is built with CMake. The full README is longer than what was provided.
mold is a high-speed drop-in replacement for the Unix linker that cuts C, C++, and Rust rebuild times from tens of seconds to under two seconds by parallelising the link step across all available CPU cores.
Mainly C++. The stack also includes C++, C++20, CMake.
Setup difficulty is rated moderate, with roughly 30min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.