< Back to all clusters
[TECHNOLOGY] · 2 sources

started · updated

Mold linker reaches version 3.0 with Rust rewrite

The high-speed mold linker has released version 3.0, marking a complete rewrite of the project from C++ to Rust. Developed by Rui Ueyama, the original creator of LLVM’s lld linker, mold is designed to accelerate the compilation of C, C++, and Rust projects on Linux.

Version 3.0 serves as a direct, drop-in replacement for the previous C++ version (2.42.1), maintaining the same command-line options, target architectures, and performance levels. Testing on the Gentoo Linux package set showed no regressions in speed. A key benefit of the Rust transition is improved memory safety; while the previous C++ implementation could suffer from segmentation faults or out-of-bounds reads when encountering corrupted input files, the Rust version utilizes bounds-checking to handle such errors more securely.

Technical changes for developers include a shift from CMake to Cargo for building from source, requiring Rust 1.95 or newer. The project has also removed its dependency on oneTBB while continuing to statically link mimalloc by default. This release also includes various bug fixes regarding statically linked executables, version scripts, and improved compatibility with GNU ld.

Entities

Gentoo · LLVM · Rui Ueyama · Rust · mold