zed-industries/zed · error

unsupported Copilot language server architecture

Error message

unsupported Copilot language server architecture: {architecture}

What it means

Zed resolves the prebuilt GitHub Copilot language-server npm package by mapping env::consts::ARCH to a GitHub asset suffix ('aarch64'->arm64, 'x86_64'->x64). This bail fires when the process is running on any other CPU architecture, so no 'copilot-language-server-{platform}-{arch}' package exists to locate under the copilot node_modules directory. It surfaces during Copilot startup, before any server process is spawned.

Solutions

  1. Run a 64-bit OS on the machine (aarch64 or x86_64) so the mapping succeeds
  2. If the arch genuinely has no official Copilot binary, disable the Copilot feature so the code path is never hit
  3. Build from source and extend the ARCH match arm only if you can supply a matching copilot-language-server build yourself
  4. Report the architecture request upstream so support can be tracked

Example fix

// before
let path = copilot_lsp_native_binary_path()?;

// after: guard before touching Copilot at all
let supported = matches!(std::env::consts::ARCH, "aarch64" | "x86_64");
if !supported {
    log::warn!("Copilot unavailable on this architecture, disabling");
    return;
}
let path = copilot_lsp_native_binary_path()?;
Defensive patterns

Strategy: validation

Validate before calling

fn copilot_arch_supported() -> bool {
    matches!(std::env::consts::ARCH, "aarch64" | "x86_64")
}

if !copilot_arch_supported() {
    // skip Copilot initialization entirely
}

Type guard

fn is_supported_copilot_arch(arch: &str) -> bool {
    matches!(arch, "aarch64" | "x86_64")
}

Prevention

When it happens

Trigger: Initializing Copilot (downloading/locating the native language server binary via copilot_lsp_native_binary_path) on a target whose env::consts::ARCH is neither aarch64 nor x86_64, e.g. armv7 (32-bit Raspberry Pi OS), riscv64, powerpc64, or a wasm32 build. The platform match (linux/darwin/win32) may have already succeeded; only the ARCH match failed.

Common situations: Community builds of Zed for ARM boards running 32-bit userlands; exotic/self-hosted architectures; cross-compilation where host arch differs from target arch; running under emulation that reports an unexpected arch string.

Related errors


AI-assisted analysis of zed-industries/zed@f4178619ac (2026-08-20). Data as JSON: /api/errors/9a6a5cffbf1ebed4. Report an issue: GitHub.

Appendix: source

Thrown at crates/copilot/src/copilot.rs:1403

    if fs.is_file(&binary_path).await {
        return Ok(binary_path);
    }

    anyhow::bail!("GitHub Copilot native language server binary was not installed")
}

fn copilot_lsp_native_binary_path() -> anyhow::Result<PathBuf> {
    let platform = match env::consts::OS {
        "linux" => "linux",
        "macos" => "darwin",
        "windows" => "win32",
        platform => anyhow::bail!("unsupported Copilot language server platform: {platform}"),
    };
    let architecture = match env::consts::ARCH {
        "aarch64" => "arm64",
        "x86_64" => "x64",
        architecture => {
            anyhow::bail!("unsupported Copilot language server architecture: {architecture}")
        }
    };

    let package_name = format!("copilot-language-server-{platform}-{architecture}");

    let executable_name = if cfg!(target_os = "windows") {
        "copilot-language-server.exe"
    } else {
        "copilot-language-server"
    };
    Ok(paths::copilot_dir()
        .join("node_modules")
        .join("@github")
        .join(package_name)
        .join(executable_name))
}

#[cfg(test)]

View on GitHub (pinned to f4178619ac)