Skip to content

Commit 0dd0c23

Browse files
committed
Describe and recommend Wild or Mold in the Linux dev docs
1 parent 15dcece commit 0dd0c23

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

docs/src/development/linux.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,33 @@ Clone down the [Zed repository](https://github.com/zed-industries/zed).
2020

2121
If you are looking to develop Zed collaboration features using a local collaboration server, please see: [Local Collaboration](./local-collaboration.md) docs.
2222

23+
### Linkers {#linker}
24+
25+
On Linux, Rust's default linker is [LLVM's `lld`](https://blog.rust-lang.org/2025/09/18/Rust-1.90.0/). Alternative linkers, especially [Wild](https://github.com/davidlattimore/wild) and [Mold](https://github.com/rui314/mold) can significantly improve clean and incremental build time.
26+
27+
At present Zed uses Mold in CI because it's more mature. For local development Wild is recommended because it's 5-20% faster than Mold.
28+
29+
These linkers can be installed with `script/install-mold` and `script/install-wild`.
30+
31+
To use Wild as your default, add these lines to your `~/.cargo/config.toml`:
32+
33+
```toml
34+
[target.x86_64-unknown-linux-gnu]
35+
linker = "clang"
36+
rustflags = ["-C", "link-arg=--ld-path=wild"]
37+
38+
[target.aarch64-unknown-linux-gnu]
39+
linker = "clang"
40+
rustflags = ["-C", "link-arg=--ld-path=wild"]
41+
```
42+
43+
To use Mold as your default:
44+
45+
```toml
46+
[target.'cfg(target_os = "linux")']
47+
rustflags = ["-C", "link-arg=-fuse-ld=mold"]
48+
```
49+
2350
## Building from source
2451

2552
Once the dependencies are installed, you can build Zed using [Cargo](https://doc.rust-lang.org/cargo/).

0 commit comments

Comments
 (0)