zed/script
Martin Pool 10b99c6f55
RFC: Recommend and enable using Wild rather than Mold on Linux for local builds (#37717)
# Summary 

Today, Zed uses Mold on Linux, but Wild can be significantly faster. 

On my machine, Wild is 14% faster at a whole-tree clean build, 20%
faster on an incremental build with a minimal change, and makes no
measurable effect on runtime performance of tests.

However, Wild's page says it's not yet ready for production, so it seems
to early to switch for production and CI builds.

This PR keeps using Mold in CI and lets developers choose in their own
config what linker to use. (The downside of this is that after landing
this change, developers will have to do some local config or it will
fall back to the default linker which may be slower.)

[Wild 0.6 is out, and their announcement has some
benchmarks](https://davidlattimore.github.io/posts/2025/09/23/wild-update-0.6.0.html).

cc @davidlattimore from Wild, just fyi

# Tasks

- [x] Measure Wild build, incremental build, and runtime performance in
different scenarios
- [x] Remove the Linux linker config from `.cargo/config.toml` in the
tree
- [x] Test rope benchmarks etc
- [x] Set the linker to Mold in CI 
- [x] Add instructions to use Wild or Mold into `linux.md`
- [x] Add a script to download Wild
- [x] Measure binary size
- [x] Recommend Wild from `scripts/linux`

# Benchmarks 

| | wild 0.6 (rust 1.89) | mold 2.37.1 (1.89) | lld (rust 1.90) | wild
advantage |
| -- | -- | -- | -- | -- |
| clean workspace build | 176s | 184s | 182s | 5% faster than mold |
| nextest run workspace after build | 137s | 142s | 137s | in the noise?
|
| incremental rebuild | 3.9s | 5.0s | 6.6s | 22% faster than mold | 

I didn't observe any apparent significant change in runtime performance
or binary size, or in the in-tree microbenchmarks.

Release Notes:

- N/A

---------

Co-authored-by: Mateusz Mikuła <oss@mateuszmikula.dev>
2025-09-25 10:35:13 +02:00
..
danger Bump pnpm dependencies (#37258) 2025-08-31 10:19:12 +00:00
flatpak Add (flatpak) and (snap) suffixes to Zed version in system info (#32903) 2025-06-17 20:39:35 +00:00
issue_response Bump pnpm dependencies (#37258) 2025-08-31 10:19:12 +00:00
lib filter out comments in deploy helper env vars (#35847) 2025-08-07 18:01:46 -07:00
licenses Make script/generate-license fail on WARN too (#34008) 2025-07-07 13:56:53 -04:00
terms Legal Terms: May 6th 2025 update (#30151) 2025-05-07 17:14:02 +00:00
update_top_ranking_issues Remove duplicate issues in top-ranking issues script (#33127) 2025-06-20 17:13:26 -04:00
analyze_highlights.py ci: Add shellcheck for scripts (#20631) 2024-11-18 16:41:22 -05:00
bootstrap collab: Add automatic install of minio deb or rpm to script/bootstrap (#32968) 2025-06-18 19:07:57 +00:00
bootstrap.ps1 windows: Make collab run on Windows (#23117) 2025-01-17 09:39:13 +02:00
build-docker Support More Linux (#18480) 2024-09-30 17:46:21 -04:00
bump-extension-cli Fix nix build (#26270) 2025-03-10 01:06:11 -07:00
bump-nightly Fix nix build (#26270) 2025-03-10 01:06:11 -07:00
bump-zed-minor-versions Fix markdown list in bump-zed-minor-versions (#38515) 2025-09-19 16:11:19 +00:00
bump-zed-patch-version Fix nix build (#26270) 2025-03-10 01:06:11 -07:00
bundle-freebsd linux: Make desktop file executable (#35597) 2025-08-04 15:35:19 -04:00
bundle-linux linux: Make desktop file executable (#35597) 2025-08-04 15:35:19 -04:00
bundle-mac Ensure we have the targets needed for bundling (#38688) 2025-09-23 03:51:03 +00:00
bundle-windows.ps1 cli: Rename script zed-wsl to zed, and enable on non-WSL (#37631) 2025-09-05 17:43:39 +02:00
check-keymaps Add CI check that cmd- is not in linux keymaps + check other mods (#32334) 2025-06-08 09:34:07 +00:00
check-licenses Change license of crates/livekit_api from AGPL to GPL (#25206) 2025-02-19 23:32:51 +00:00
check-links ci: Restore lychee link check. Only validate internal links (#32463) 2025-06-10 11:20:07 -04:00
check-todos Add CI check that cmd- is not in linux keymaps + check other mods (#32334) 2025-06-08 09:34:07 +00:00
clear-target-dir-if-larger-than Fix nix build (#26270) 2025-03-10 01:06:11 -07:00
clear-target-dir-if-larger-than.ps1 windows: Publish nightly (#24800) 2025-07-09 08:57:03 +08:00
clippy Run additional checks from script/clippy if local (#29768) 2025-05-02 01:26:12 +00:00
clippy.ps1 Windows tests on self-hosted runners (#29764) 2025-06-16 17:29:36 -04:00
collab-flamegraph Fix nix build (#26270) 2025-03-10 01:06:11 -07:00
crate-dep-graph Fix nix build (#26270) 2025-03-10 01:06:11 -07:00
create-draft-release Use our own git clone in draft release notes (#20956) 2024-11-21 11:55:22 -07:00
create-migration remoting (#9680) 2024-03-22 08:44:56 -06:00
debug-cli Add a small script to make debugging the CLI easier (#32971) 2025-06-18 19:24:16 +00:00
deploy-collab Fix nix build (#26270) 2025-03-10 01:06:11 -07:00
deploy-postgrest Fix nix build (#26270) 2025-03-10 01:06:11 -07:00
determine-release-channel Fix bad quote in script/determine-release-channel (#20613) 2024-11-13 12:41:50 -05:00
determine-release-channel.ps1 windows: Publish nightly (#24800) 2025-07-09 08:57:03 +08:00
digital-ocean-db.sh Add a script to connect to the database. (#32023) 2025-06-04 09:23:23 -06:00
draft-release-notes Use our own git clone in draft release notes (#20956) 2024-11-21 11:55:22 -07:00
drop-test-dbs Fix nix build (#26270) 2025-03-10 01:06:11 -07:00
exit-ci-if-dev-drive-is-full.ps1 windows: Fix tests on Windows (#22616) 2025-02-05 14:30:09 +00:00
freebsd Add initial FreeBSD script & installation doc (#30981) 2025-06-06 23:14:25 +00:00
generate-licenses Bump Rust to 1.90 (#38436) 2025-09-22 14:36:10 -07:00
generate-licenses-csv Bump Rust to 1.90 (#38436) 2025-09-22 14:36:10 -07:00
generate-licenses.ps1 Bump Rust to 1.90 (#38436) 2025-09-22 14:36:10 -07:00
generate-terms-rtf Fix nix build (#26270) 2025-03-10 01:06:11 -07:00
get-crate-version Fix nix build (#26270) 2025-03-10 01:06:11 -07:00
get-crate-version.ps1 windows: Publish nightly (#24800) 2025-07-09 08:57:03 +08:00
get-preview-channel-changes Fetch all staff in get-preview-channel-changes script (#37940) 2025-09-10 20:05:51 +00:00
get-pull-requests-since Add a get-release-notes-since script (#18445) 2024-09-27 10:59:19 -04:00
get-release-notes-since Add a get-release-notes-since script (#18445) 2024-09-27 10:59:19 -04:00
get-released-version Fix nix build (#26270) 2025-03-10 01:06:11 -07:00
get-stable-channel-release-notes Add get stable channel release notes script (#36969) 2025-08-26 23:35:29 +00:00
github-pr-status A script to help with PR naggery (#32025) 2025-06-04 09:23:14 -06:00
histogram
import-themes Fix nix build (#26270) 2025-03-10 01:06:11 -07:00
install-cmake Improve install-cmake script (#20836) 2024-11-18 16:39:57 -05:00
install-linux linux scripts: Respect $CARGO_TARGET_DIR (#13830) 2024-07-05 14:19:05 +03:00
install-mold Support More Linux (#18480) 2024-09-30 17:46:21 -04:00
install-rustup.ps1 Windows tests on self-hosted runners (#29764) 2025-06-16 17:29:36 -04:00
install-wild RFC: Recommend and enable using Wild rather than Mold on Linux for local builds (#37717) 2025-09-25 10:35:13 +02:00
install.sh Use TMPDIR environment variable in install script (#35636) 2025-08-08 05:05:56 +00:00
kube-shell Fix nix build (#26270) 2025-03-10 01:06:11 -07:00
language-extension-version Add text objects to extensions (#21488) 2024-12-03 13:56:25 -07:00
linux RFC: Recommend and enable using Wild rather than Mold on Linux for local builds (#37717) 2025-09-25 10:35:13 +02:00
metal-debug Fix nix build (#26270) 2025-03-10 01:06:11 -07:00
mitm-proxy.sh Improve script/mitm-proxy.sh to support podman (#25834) 2025-02-28 22:37:03 +00:00
new-crate Centralize ZED_STATELESS (#37492) 2025-09-03 22:10:14 +00:00
prompts Fix nix build (#26270) 2025-03-10 01:06:11 -07:00
randomized-test-ci
randomized-test-minimize
remote-server Add remote server cross compilation (#19136) 2024-10-12 23:23:56 -07:00
reset_db Fix reset_db script (#29067) 2025-04-18 19:28:14 +00:00
run-local-minio collab: Add automatic install of minio deb or rpm to script/bootstrap (#32968) 2025-06-18 19:07:57 +00:00
seed-db Fix nix build (#26270) 2025-03-10 01:06:11 -07:00
setup-dev-driver.ps1 windows: Use dev drive instead of ReFS (#25858) 2025-03-01 22:43:10 +08:00
shellcheck-scripts ci: Add shellcheck for scripts (#20631) 2024-11-18 16:41:22 -05:00
snap-build Add scripts and configuration for building snap package (#25064) 2025-02-19 10:28:23 -07:00
snap-try Add scripts and configuration for building snap package (#25064) 2025-02-19 10:28:23 -07:00
squawk ACP debug tools pane (#36768) 2025-08-22 19:32:49 +00:00
storybook Fix nix build (#26270) 2025-03-10 01:06:11 -07:00
trigger-release Fix nix build (#26270) 2025-03-10 01:06:11 -07:00
uninstall.sh Add an uninstall script (#21213) 2024-11-28 10:31:12 +02:00
update-json-schemas Bump JSON schemas: package.json, tsconfig.json (#20910) 2024-11-20 13:35:00 -05:00
update-workspace-hack Add workspace-hack (#27277) 2025-04-02 13:26:34 -07:00
update-workspace-hack.ps1 windows: Add update-workspace-hack.ps1 script (#28219) 2025-04-07 21:26:26 +08:00
upload-extension-cli
upload-nightly freebsd: Improve nightly builds of zed-remote-server (#32255) 2025-06-06 15:30:03 +00:00
upload-nightly.ps1 windows: Publish nightly (#24800) 2025-07-09 08:57:03 +08:00
what-is-deployed Fix nix build (#26270) 2025-03-10 01:06:11 -07:00
zed-local Rework authentication for local Cloud/Collab development (#35450) 2025-08-01 00:55:17 +00:00