{"record":{"id":"b4b99172b34166d7","repo":"jdx/mise","slug":"unsupported-architecture-supported-x64-arm","errorCode":null,"errorMessage":"Unsupported architecture '{}'. Supported: x64, arm64, x86, loongarch64, riscv64","messagePattern":"Unsupported architecture '(.+?)'\\. Supported: x64, arm64, x86, loongarch64, riscv64","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/platform.rs","lineNumber":88,"sourceCode":"                _ => None,\n            })\n    }\n\n    /// Validate that this platform is supported\n    pub(crate) fn validate(&self) -> Result<()> {\n        // Validate OS\n        match self.os.as_str() {\n            \"linux\" | \"macos\" | \"windows\" | \"android\" => {}\n            _ => bail!(\n                \"Unsupported OS '{}'. Supported: linux, macos, windows, android\",\n                self.os\n            ),\n        }\n\n        // Validate architecture\n        match self.arch.as_str() {\n            \"x64\" | \"arm64\" | \"x86\" | \"loongarch64\" | \"riscv64\" => {}\n            _ => bail!(\n                \"Unsupported architecture '{}'. Supported: x64, arm64, x86, loongarch64, riscv64\",\n                self.arch\n            ),\n        }\n\n        // Validate qualifier if present\n        if let Some(qualifier) = &self.qualifier {\n            match qualifier.as_str() {\n                \"gnu\" | \"glibc\" | \"musl\" | \"msvc\" | \"baseline\" | \"musl-baseline\" => {}\n                _ => bail!(\n                    \"Unsupported qualifier '{}'. Supported: gnu, glibc, musl, msvc, baseline, musl-baseline\",\n                    qualifier\n                ),\n            }\n        }\n\n        Ok(())\n    }","sourceCodeStart":70,"sourceCodeEnd":106,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/platform.rs#L70-L106","documentation":"Raised by Platform::validate when the parsed platform's architecture field is not one of the supported values: x64, arm64, x86, loongarch64, riscv64. The platform parsed fine but names an architecture without backend support.","triggerScenarios":"Calling validate() on a Platform whose arch is outside the supported set — e.g. parse(\"linux-amd64\"), parse(\"linux-aarch64\"), parse(\"linux-armv7\") — during platform validation.","commonSituations":"Using Go/Rust-style arch names (amd64, aarch64, x86_64) instead of this library's short names (x64, arm64, x86); typos like \"arm\" or \"x86-64\" splitting into unexpected parts; targeting genuinely unsupported architectures (ppc64le, s390x, mips).","solutions":["Use the supported arch names: x64 (not amd64/x86_64), arm64 (not aarch64), x86 (not i386/686).","For 64-bit ARM Linux with musl, use a qualifier: \"linux-arm64-musl\".","If your target architecture genuinely isn't supported (ppc64le, s390x, mips), build/host for a supported arch instead."],"exampleFix":"// before\nplatform = \"linux-amd64\"\n// after\nplatform = \"linux-x64\"","handlingStrategy":"validation","validationCode":"const SUPPORTED_ARCH = new Set([\"x64\", \"arm64\", \"x86\", \"loongarch64\", \"riscv64\"]);\nconst ARCH_ALIASES = { amd64: \"x64\", x86_64: \"x64\", aarch64: \"arm64\", i386: \"x86\", i686: \"x86\" };\nfunction normalizeArch(arch) {\n  const a = ARCH_ALIASES[arch] ?? arch;\n  if (!SUPPORTED_ARCH.has(a)) throw new Error(`Unsupported architecture \"${arch}\"`);\n  return a;\n}","typeGuard":"function isSupportedArch(arch) {\n  return [\"x64\", \"arm64\", \"x86\", \"loongarch64\", \"riscv64\"].includes(arch);\n}","tryCatchPattern":"try {\n  platform.validate();\n} catch (e) {\n  if (String(e).startsWith(\"Unsupported architecture\")) {\n    throw new Error(`Use x64/arm64/x86/loongarch64/riscv64 (e.g. amd64 -> x64, aarch64 -> arm64).`);\n  } else throw e;\n}","preventionTips":["Normalize arch names from other ecosystems first: amd64/x86_64 -> x64, aarch64 -> arm64.","Check target architecture support (ppc64le, s390x, mips are not supported) before configuring installs.","Share a single platform-string constant table across scripts to avoid ad-hoc names."],"tags":["platform","validation","unsupported-architecture","configuration"],"backgroundTag":"unsupported-platform","analyzedSha":"533346cc374382b41ec5ff70536252b2e96e725c","analyzedAt":"2026-09-17T13:35:38.149Z","contentChangedAt":"2026-09-17T13:35:38.149Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}