What does HackerNews think of mold?

mold: A Modern Linker 🦠

Language: C++

Rui, can you open a new Discussions thread at https://github.com/rui314/mold so we can transfer the whole conversation there?

We could ask for advice from other project developers that have succeeded on their own journey.

https://github.com/rui314/mold don't support live update, but fast enough to boost productivity.
I can infer from context that mold is a linker. It took searching for https://github.com/rui314/mold to learn what it actually was, though:

"mold is a faster drop-in replacement for existing Unix linkers. It is several times faster than the LLVM lld linker, the second-fastest open-source linker which I originally created a few years ago. mold is designed to increase developer productivity by reducing build time, especially in rapid debug-edit-rebuild cycles."

I don't understand how things like this still manage to front-page without a cursory explanation.

I recently developed a similarly sized APP with tauri + rust (3kLOC+~250 deps) and found that using mold[0] as a linker helped quite a bit for incremental builds. There were also a few other bits, like decoupling the build step in tauri from the frontend build, that helped.

[0]: https://github.com/rui314/mold

Speaking of significantly faster linkers, I personally use mold[1], including when writing in Rust.

[1]: https://github.com/rui314/mold

> You have to link each test file which can be slow

Using Mold [0] as the linker might help. Written by the author of lld.

  Program (linker output size):  GNU gold | LLVM lld |  mold

  Chrome 96 (1.89 GiB):            53.86s |   11.74s | 2.21s

  Clang 13 (3.18 GiB):             64.12s |    5.82s | 2.90s

  Firefox 89 libxul (1.64 GiB):    32.95s |    6.80s | 1.42s
[0] https://github.com/rui314/mold

edit: add citation, info, times, link, will -> might, and formatting.

> https://github.com/rui314/mold would suggest otherwise.

Does it, though?

I mean, if you read that link you'll notice it boasts the linker's performance by comparing it with cp and how it's "so fast that it is only 2x slower than cp on the same machine."

Is cp supposed to be CPU-bound?

Osmos.io is built on Rust so that’s LLVM. No commercial vendor involved.

There is Mold (https://github.com/rui314/mold) as an alternative but it doesn’t support MacOS yet and that’s a blocker for our team.