zed-industries/zed · error · anyhow::Error

unsupported architecture

Error message

unsupported architecture

What it means

Companion to the OS check in platform::Host::current_platform: env::consts::ARCH must be "aarch64" or "x86_64" to map onto platform::Architecture. Any other architecture constant — arm, armv7, i686/x86, riscv64, loongarch64, powerpc64 — bails with "unsupported architecture". It is a compile-time constant, so the failure is deterministic per build.

Source

Thrown at crates/extension_host/src/wasm_host/wit/since_v0_8_0.rs:873

    ) -> wasmtime::Result<Result<github::GithubRelease, String>> {
        maybe!(async {
            let release = ::http_client::github::get_release_by_tag_name(
                &repo,
                &tag,
                self.host.http_client.clone(),
            )
            .await?;
            Ok(release.into())
        })
        .await
        .to_wasmtime_result()
    }
}

impl platform::Host for WasmState {
    async fn current_platform(
        &mut self,
    ) -> wasmtime::Result<(platform::Os, platform::Architecture)> {
        Ok((
            match env::consts::OS {
                "macos" => platform::Os::Mac,
                "linux" => platform::Os::Linux,
                "windows" => platform::Os::Windows,
                _ => return Err(wasmtime::Error::msg("unsupported os")),
            },
            match env::consts::ARCH {
                "aarch64" => platform::Architecture::Aarch64,
                "x86_64" => platform::Architecture::X8664,
                _ => return Err(wasmtime::Error::msg("unsupported architecture")),
            },
        ))
    }
}

impl From<std::process::Output> for process::Output {
    fn from(output: std::process::Output) -> Self {

View on GitHub (pinned to 5a9b9558db)

Solutions

  1. Run on aarch64 or x86_64, which are the only supported architectures
  2. When porting, add a match arm only together with a matching platform::Architecture WIT variant, or gate extension loading off entirely on that arch
  3. File an upstream issue requesting the architecture if the platform is viable
Defensive patterns

Strategy: fallback

Validate before calling

if !matches!(std::env::consts::ARCH, "aarch64" | "x86_64") {
    // avoid current_platform(); no WIT Architecture variant exists for this build
}

Type guard

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

Prevention

When it happens

Trigger: Executing the extension host on a 32-bit x86 (i686), armv7, riscv64, or loongarch64 machine when an extension calls current_platform().

Common situations: Building/running on ARMv7 boards, 32-bit chroots, or emerging architectures; every extension that chooses release artifacts by architecture hits the bail.

Understand the failure class

Background: "unsupported platform" / "not supported on this platform" errors: what they mean and how to fix them — this error's family across 47 libraries.

Related errors


AI-assisted analysis of zed-industries/zed@5a9b9558db (2026-08-20). Data as JSON: /api/errors/9929157489d7cc74. Report an issue: GitHub.