Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Removal of mold/wild scripts and mentions in docs (#53078)
Nitin K. M.64b93202f843
diff --git a/.github/actions/build_docs/action.yml b/.github/actions/build_docs/action.ymlindex 1ff271f73ff..002f6f4653f 100644--- a/.github/actions/build_docs/action.yml+++ b/.github/actions/build_docs/action.yml@@ -19,10 +19,6 @@ runs:shell: bash -euxo pipefail {0}run: ./script/linux- - name: Install mold linker- shell: bash -euxo pipefail {0}- run: ./script/install-mold-- name: Download WASI SDKshell: bash -euxo pipefail {0}run: ./script/download-wasi-sdkdiff --git a/Dockerfile-distros b/Dockerfile-distrosindex c8a98d2f7db..5abda933a5a 100644--- a/Dockerfile-distros+++ b/Dockerfile-distros@@ -11,8 +11,7 @@ ENV CARGO_TERM_COLOR=alwaysCOPY script/linux script/RUN ./script/linux-COPY script/install-mold script/install-cmake script/-RUN ./script/install-mold "2.34.0"+COPY script/install-cmake script/RUN ./script/install-cmake "3.30.4"COPY . .diff --git a/crates/remote/src/transport.rs b/crates/remote/src/transport.rsindex 8d0f212cfc4..5d57b703287 100644--- a/crates/remote/src/transport.rs+++ b/crates/remote/src/transport.rs@@ -263,10 +263,6 @@ async fn build_remote_server_from_source(rust_flags.push_str(&format!(" -C link-arg=-L{path}"));}}- if build_remote_server.contains("mold") {- rust_flags.push_str(" -C link-arg=-fuse-ld=mold");- }-if platform.arch.as_str() == std::env::consts::ARCH&& platform.os.as_str() == std::env::consts::OS{diff --git a/docs/src/development/linux.md b/docs/src/development/linux.mdindex af81d6220c7..56545111fd1 100644--- a/docs/src/development/linux.md+++ b/docs/src/development/linux.md@@ -21,33 +21,6 @@ Clone the [Zed repository](https://github.com/zed-industries/zed).If you prefer to install the system libraries manually, you can find the list of required packages in the `script/linux` file.-### Linkers {#linker}--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 improve clean and incremental build times.--Zed currently uses Mold in CI because it is more mature. For local development, Wild is recommended because it is typically 5-20% faster than Mold.--These linkers can be installed with `script/install-mold` and `script/install-wild`.--To use Wild as your default, add these lines to your `~/.cargo/config.toml`:--```toml-[target.x86_64-unknown-linux-gnu]-linker = "clang"-rustflags = ["-C", "link-arg=--ld-path=wild"]--[target.aarch64-unknown-linux-gnu]-linker = "clang"-rustflags = ["-C", "link-arg=--ld-path=wild"]-```--To use Mold as your default:--```toml-[target.'cfg(target_os = "linux")']-rustflags = ["-C", "link-arg=-fuse-ld=mold"]-```-## Building from sourceOnce the dependencies are installed, you can build Zed using [Cargo](https://doc.rust-lang.org/cargo/).diff --git a/script/install-mold b/script/install-molddeleted file mode 100755index b0bf8517700..00000000000--- a/script/install-mold+++ /dev/null@@ -1,45 +0,0 @@-#!/usr/bin/env bash--# Install `mold` official binaries from GitHub Releases.-#-# Adapted from the official rui314/setup-mold@v1 action to:-# * use environment variables instead of action inputs-# * remove make-default support-# * use curl instead of wget-# * support doas for sudo-# * support redhat systems-# See: https://github.com/rui314/setup-mold/blob/main/action.yml--set -euo pipefail--MOLD_VERSION="2.34.0"--if [ "$(uname -s)" != "Linux" ]; then- echo "Error: This script is intended for Linux systems only."- exit 1-elif [ -e /usr/local/bin/mold ]; then- echo "Warning: existing mold found at /usr/local/bin/mold. Skipping installation."- exit 0-fi--if [ "$(whoami)" = root ]; then SUDO=; else SUDO="$(command -v sudo || command -v doas || true)"; fi--MOLD_REPO="${MOLD_REPO:-https://github.com/rui314/mold}"-MOLD_URL="${MOLD_URL:-$MOLD_REPO}/releases/download/v$MOLD_VERSION/mold-$MOLD_VERSION-$(uname -m)-linux.tar.gz"--echo "Downloading from $MOLD_URL"-curl -fsSL --output - "$MOLD_URL" \- | $SUDO tar -C /usr/local --strip-components=1 --no-overwrite-dir -xzf ---# Note this binary depends on the system libatomic.so.1 which is usually-# provided as a dependency of gcc so it should be available on most systems.--cat <<EOF-Mold is installed to /usr/local/bin/mold--To make it your default, add or merge these lines into your ~/.cargo/config.toml:--[target.'cfg(target_os = "linux")']-linker = "clang"-rustflags = ["-C", "link-arg=-fuse-ld=mold"]-EOFdiff --git a/script/install-wild b/script/install-wilddeleted file mode 100755index 4c2d0348965..00000000000--- a/script/install-wild+++ /dev/null@@ -1,44 +0,0 @@-#!/usr/bin/env bash--# Install wild-linker official binaries from GitHub Releases.--set -euo pipefail--WILD_VERSION="${WILD_VERSION:-${1:-0.6.0}}"-if [ "$(uname -s)" != "Linux" ]; then- echo "Error: This script is intended for Linux systems only."- exit 1-elif [ -z "$WILD_VERSION" ]; then- echo "Usage: $0 [version]"- exit 1-elif command -v wild >/dev/null 2>&1 && wild --version | grep -Fq "$WILD_VERSION" ; then- echo "Warning: existing wild $WILD_VERSION found at $(command -v wild). Skipping installation."- exit 0-fi--if [ "$(whoami)" = root ]; then SUDO=; else SUDO="$(command -v sudo || command -v doas || true)"; fi--ARCH="$(uname -m)"-WILD_REPO="${WILD_REPO:-https://github.com/davidlattimore/wild}"-WILD_PACKAGE="wild-linker-${WILD_VERSION}-${ARCH}-unknown-linux-gnu"-WILD_URL="${WILD_URL:-$WILD_REPO}/releases/download/$WILD_VERSION/${WILD_PACKAGE}.tar.gz"-DEST_DIR=/usr/local/bin--echo "Downloading from $WILD_URL"-curl -fsSL --output - "$WILD_URL" \- | $SUDO tar -C ${DEST_DIR} --strip-components=1 --no-overwrite-dir -xzf - \- "${WILD_PACKAGE}/wild"--cat <<EOF-Wild is installed to ${DEST_DIR}/wild--To make it your default, add or merge these lines into your ~/.cargo/config.toml:--[target.x86_64-unknown-linux-gnu]-linker = "clang"-rustflags = ["-C", "link-arg=--ld-path=wild"]--[target.aarch64-unknown-linux-gnu]-linker = "clang"-rustflags = ["-C", "link-arg=--ld-path=wild"]-EOFdiff --git a/script/linux b/script/linuxindex 1eda7909b95..a2916a0b26b 100755--- a/script/linux+++ b/script/linux@@ -12,9 +12,6 @@ function finalize {# after packages install (curl, etc), get the rust toolchainwhich rustup > /dev/null 2>&1 || curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -ycat <<EOF-Note: It's recommended to install and configure Wild or Mold for faster builds.- Run script/install-wild or script/install-mold.-Finished installing Linux dependencies with script/linuxEOF}@@ -55,11 +52,11 @@ if [[ -n $apt ]]; then)if (grep -qP 'PRETTY_NAME="(Debian|Raspbian).+13' /etc/os-release); then# libstdc++-14-dev is in build-essential- deps+=( mold )+ trueelif (grep -qP 'PRETTY_NAME="(Linux Mint 22|.+24\.(04|10))' /etc/os-release); then- deps+=( mold libstdc++-14-dev )+ deps+=( libstdc++-14-dev )elif (grep -qP 'PRETTY_NAME="((Debian|Raspbian).+12|Linux Mint 21|.+22\.04)' /etc/os-release); then- deps+=( mold libstdc++-12-dev )+ deps+=( libstdc++-12-dev )elif (grep -qP 'PRETTY_NAME="((Debian|Raspbian).+11|Linux Mint 20|.+20\.04)' /etc/os-release); then# Ubuntu 20.04 ships clang-10 and libstdc++-10 which lack adequate C++20# support for building webrtc-sys (requires -std=c++20, lambdas in@@ -125,7 +122,6 @@ if [[ -n $dnf ]] || [[ -n $yum ]]; thenperl-IPC-Cmdperl-File-Compareperl-File-Copy- mold)elif grep -qP '^ID="?(rhel|rocky|alma|centos|ol)' /etc/os-release; thendeps+=( perl-interpreter )@@ -183,7 +179,6 @@ if [[ -n $zyp ]]; thenlibxkbcommon-x11-devellibzstd-develmake- moldopenssl-develsqlite3-develtar@@ -217,7 +212,6 @@ if [[ -n $pacman ]]; thenopensslzstdpkgconf- moldsqlitepipewirexdg-desktop-portal@@ -250,7 +244,6 @@ if [[ -n $xbps ]]; thenopenssl-develwayland-develvulkan-loader- moldsqlite-develpipewirexdg-desktop-portal@@ -277,7 +270,6 @@ if [[ -n $emerge ]]; thenmedia-libs/vulkan-loaderx11-libs/libxcbx11-libs/libxkbcommon- sys-devel/molddev-db/sqlitemedia-video/pipewiresys-apps/xdg-desktop-portal