{"record":{"id":"f333703e3fe95022","repo":"zed-industries/zed","slug":"unsupported-os","errorCode":null,"errorMessage":"unsupported os","messagePattern":"unsupported os","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/extension_host/src/wasm_host/wit/since_v0_8_0.rs","lineNumber":868,"sourceCode":"\n    async fn github_release_by_tag_name(\n        &mut self,\n        repo: String,\n        tag: String,\n    ) -> wasmtime::Result<Result<github::GithubRelease, String>> {\n        maybe!(async {\n            let release = ::http_client::github::get_release_by_tag_name(\n                &repo,\n                &tag,\n                self.host.http_client.clone(),\n            )\n            .await?;\n            Ok(release.into())\n        })\n        .await\n        .to_wasmtime_result()\n    }\n}\n\nimpl platform::Host for WasmState {\n    async fn current_platform(\n        &mut self,\n    ) -> wasmtime::Result<(platform::Os, platform::Architecture)> {\n        Ok((\n            match env::consts::OS {\n                \"macos\" => platform::Os::Mac,\n                \"linux\" => platform::Os::Linux,\n                \"windows\" => platform::Os::Windows,\n                _ => return Err(wasmtime::Error::msg(\"unsupported os\")),\n            },\n            match env::consts::ARCH {\n                \"aarch64\" => platform::Architecture::Aarch64,\n                \"x86_64\" => platform::Architecture::X8664,\n                _ => return Err(wasmtime::Error::msg(\"unsupported architecture\")),\n            },\n        ))","sourceCodeStart":850,"sourceCodeEnd":886,"githubUrl":"https://github.com/zed-industries/zed/blob/5a9b9558db01a6b906cec2fb70a797affdc58cdd/crates/extension_host/src/wasm_host/wit/since_v0_8_0.rs#L850-L886","documentation":"platform::Host::current_platform maps Rust's compile-time env::consts::OS onto the WIT platform::Os enum, which only has Mac, Linux, and Windows. Any other OS string — FreeBSD, OpenBSD, DragonFly, Android, etc. — bails with \"unsupported os\". Because the value is a build-time constant, the error fires deterministically for every extension that queries the platform on such a build.","triggerScenarios":"Running the extension host binary on an OS other than macOS, Linux, or Windows (e.g. FreeBSD port, Android/Termux) and having any extension call current_platform().","commonSituations":"Community builds of the editor for BSD variants, or an embedded use of the extension_host crate on a niche platform; every wasm extension that gates download logic on platform fails immediately.","solutions":["Run on macOS, Linux, or Windows where the host is supported","If porting the app, patch the match to add an arm (e.g. map freebsd to platform::Os::Linux only if the WIT enum is also extended — otherwise keep extensions disabled)","Report the platform gap upstream so the WIT Os enum grows a variant"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"// gate extension features before any platform query\nif !matches!(std::env::consts::OS, \"macos\" | \"linux\" | \"windows\") {\n    // skip current_platform() / disable platform-dependent extension paths\n}","typeGuard":"fn is_supported_os() -> bool {\n    matches!(std::env::consts::OS, \"macos\" | \"linux\" | \"windows\")\n}","tryCatchPattern":null,"preventionTips":["Run the extension host on the three supported operating systems","When porting, patch the Os mapping and WIT enum together rather than letting the bail surface to extensions"],"tags":["platform","os","wasm","extension","portability"],"backgroundTag":"unsupported-platform","analyzedSha":"5a9b9558db01a6b906cec2fb70a797affdc58cdd","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}