Tidavo
Monday 5 October 2026

Fast Linker Program Mold Rebuilt in Rust to Replace Older System Tools

The program switches from C++ while matching earlier speed, improving file safety, and fixing many target issues.

5 Oct 2026

A new major version of mold has arrived. A linker is a tool that joins together pieces of compiled computer code into a finished program. The author, known as rui314, released mold 3.0.0 as the first edition completely rewritten in the Rust programming language. The previous release, version 2.42.1, marked the end of the original C++ codebase.

The broader plan for the 3.x series is to match GNU ld, an older standard tool, especially when reading custom instructions called linker scripts. The project aims to become the default linker choice for Linux distributions. Version 3.0 acts as a direct replacement for version 2.42.1, using the same command options, targeting the same computer types, and delivering matching speed.

The change to Rust adds protections against damaged input files. In the past, bad files could make the C++ code read outside memory boundaries, leading to a sudden crash known as a segmentation fault. The new edition checks these memory limits. If it hits bad data, it stops immediately with a controlled exit instead of crashing.

Tests showed no lost functions. The author verified the tool across all supported target chips, measured real software tasks, and used mold to build all software packages for the Gentoo operating system.

The process for compiling mold has also changed. Builders now use Cargo, the standard build manager for Rust, instead of the older CMake system. Compiling the project requires Rust version 1.95 or newer alongside a C compiler. CMake settings are gone, and a new test script replaces the old setup tools.

The tool no longer relies on a library called oneTBB. It includes an embedded memory allocator named mimalloc 3.5.3, though builders can choose to use the standard system memory tools instead. It also packages zstd and BLAKE3, and it connects to the system copy of zlib if one exists.

This update repairs dozens of bugs across many chip designs. A memory reservation of eight gigabytes at launch was removed, allowing the tool to run on systems with tight memory restrictions. The linker also stopped adding several unneeded internal symbols and now reads single-dash commands the same way GNU ld does.

Other fixes address large software builds on modern chips. On ARM64 hardware, the tool had jumped to wrong addresses during complex tasks like building debug editions of the Chromium web browser. The release corrects these link errors, improves support for RISC-V and LoongArch processors, and turns several silent failures into clear warning messages.

Development continues through public funding via GitHub Sponsors and OpenCollective. The release notes thank several backing groups and individuals giving 32 dollars a month or more, including Mercedes-Benz Group, SAP, Cybozu, and Josh Triplett.

Hacker News