🛠️Mold 3.0 Drops C++, Becomes Rusty
Mold 3.0 is here, but it's not just a new version
TL;DR
Mold 3.0, the high-speed linker, now runs on Rust. It's a drop-in replacement for the C++ version, with improved safety and compatibility with GNU ld. Key changes include Rust 1.95+ requirement and Cargo build system.
Mold 3.0 has ditched C++ for Rust, aiming to close compatibility gaps with GNU ld. This update makes Mold safer and more reliable, especially with corrupted input files. Developers using Mold will see no change in performance or output, but the build system now uses Cargo instead of CMake. Rust 1.95 or later is required, and the linker now statically links mimalloc 3.5.3. This move impacts anyone relying on Mold's high-speed linking capabilities without altering their workflows.
Key Points
Mold 3.0 is a Rust rewrite of the high-speed linker, replacing the C++ version.
Requires Rust 1.95 or later, built with Cargo instead of CMake.
Statically links mimalloc 3.5.3; use --features system-allocator for system malloc.
Includes zlib, zstd, and BLAKE3 if available; no longer depends on oneTBB.
Fixes several crashes and issues, improving compatibility with GNU ld.
Why It Matters
If you're using Mold for high-speed linking in your C++ projects, the Rust rewrite doesn't change your workflow. But it does make Mold safer and more compatible with GNU ld, which could be a game-changer for teams looking to standardize on a single linker.
Comments
Be the first to comment
Enjoyed this article?
Get it daily. 7am. Free. Reads in 5 minutes.