{"record":{"id":"9a6a5cffbf1ebed4","repo":"zed-industries/zed","slug":"unsupported-copilot-language-server-architecture","errorCode":null,"errorMessage":"unsupported Copilot language server architecture: {architecture}","messagePattern":"unsupported Copilot language server architecture: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/copilot/src/copilot.rs","lineNumber":1403,"sourceCode":"    if fs.is_file(&binary_path).await {\n        return Ok(binary_path);\n    }\n\n    anyhow::bail!(\"GitHub Copilot native language server binary was not installed\")\n}\n\nfn copilot_lsp_native_binary_path() -> anyhow::Result<PathBuf> {\n    let platform = match env::consts::OS {\n        \"linux\" => \"linux\",\n        \"macos\" => \"darwin\",\n        \"windows\" => \"win32\",\n        platform => anyhow::bail!(\"unsupported Copilot language server platform: {platform}\"),\n    };\n    let architecture = match env::consts::ARCH {\n        \"aarch64\" => \"arm64\",\n        \"x86_64\" => \"x64\",\n        architecture => {\n            anyhow::bail!(\"unsupported Copilot language server architecture: {architecture}\")\n        }\n    };\n\n    let package_name = format!(\"copilot-language-server-{platform}-{architecture}\");\n\n    let executable_name = if cfg!(target_os = \"windows\") {\n        \"copilot-language-server.exe\"\n    } else {\n        \"copilot-language-server\"\n    };\n    Ok(paths::copilot_dir()\n        .join(\"node_modules\")\n        .join(\"@github\")\n        .join(package_name)\n        .join(executable_name))\n}\n\n#[cfg(test)]","sourceCodeStart":1385,"sourceCodeEnd":1421,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/copilot/src/copilot.rs#L1385-L1421","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Run a 64-bit OS on the machine (aarch64 or x86_64) so the mapping succeeds","If the arch genuinely has no official Copilot binary, disable the Copilot feature so the code path is never hit","Build from source and extend the ARCH match arm only if you can supply a matching copilot-language-server build yourself","Report the architecture request upstream so support can be tracked"],"exampleFix":"// before\nlet path = copilot_lsp_native_binary_path()?;\n\n// after: guard before touching Copilot at all\nlet supported = matches!(std::env::consts::ARCH, \"aarch64\" | \"x86_64\");\nif !supported {\n    log::warn!(\"Copilot unavailable on this architecture, disabling\");\n    return;\n}\nlet path = copilot_lsp_native_binary_path()?;","handlingStrategy":"validation","validationCode":"fn copilot_arch_supported() -> bool {\n    matches!(std::env::consts::ARCH, \"aarch64\" | \"x86_64\")\n}\n\nif !copilot_arch_supported() {\n    // skip Copilot initialization entirely\n}","typeGuard":"fn is_supported_copilot_arch(arch: &str) -> bool {\n    matches!(arch, \"aarch64\" | \"x86_64\")\n}","tryCatchPattern":null,"preventionTips":["Gate Copilot feature registration behind an arch check at startup","Keep the supported-arch list in one place and assert on it in tests for every tier you build"],"tags":["copilot","architecture","platform","startup","rust"],"backgroundTag":"unsupported-cpu-architecture","analyzedSha":"f4178619acd0d47ea1f76a2025c42962c6d6638c","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}