jdx/mise · error

Unsupported architecture '{}'. Supported: x64, arm64, x86, l

Error message

Unsupported architecture '{}'. Supported: x64, arm64, x86, loongarch64, riscv64

What it means

Platform::validate rejects architectures outside {x64, arm64, x86, loongarch64, riscv64}. The trap is naming conventions: mise says x64 where Go says amd64 and Rust says x86_64, arm64 not aarch64, and 32-bit Intel is x86. It fires when parsing `mise lock -p` values or lockfile_platforms entries.

Source

Thrown at src/platform.rs:88

                _ => None,
            })
    }

    /// Validate that this platform is supported
    pub(crate) fn validate(&self) -> Result<()> {
        // Validate OS
        match self.os.as_str() {
            "linux" | "macos" | "windows" | "android" => {}
            _ => bail!(
                "Unsupported OS '{}'. Supported: linux, macos, windows, android",
                self.os
            ),
        }

        // Validate architecture
        match self.arch.as_str() {
            "x64" | "arm64" | "x86" | "loongarch64" | "riscv64" => {}
            _ => bail!(
                "Unsupported architecture '{}'. Supported: x64, arm64, x86, loongarch64, riscv64",
                self.arch
            ),
        }

        // Validate qualifier if present
        if let Some(qualifier) = &self.qualifier {
            match qualifier.as_str() {
                "gnu" | "glibc" | "musl" | "msvc" | "baseline" | "musl-baseline" => {}
                _ => bail!(
                    "Unsupported qualifier '{}'. Supported: gnu, glibc, musl, msvc, baseline, musl-baseline",
                    qualifier
                ),
            }
        }

        Ok(())
    }

View on GitHub (pinned to 6f52dcdf99)

Solutions

  1. Rename to mise's vocabulary: amd64 and x86_64 become x64; aarch64 and arm become arm64; i386/i686 become x86.
  2. Keep loongarch64 and riscv64 spelled exactly as listed.
  3. Re-run `mise lock -p` with corrected strings to confirm.

Example fix

# before
mise lock -p linux-amd64 -p linux-aarch64

# after
mise lock -p linux-x64 -p linux-arm64
Defensive patterns

Strategy: validation

Validate before calling

arch="$(cut -d- -f2 <<<"$p")"
case "$arch" in
  x64|arm64|x86|loongarch64|riscv64) ;;
  *) echo "unsupported arch: $arch (amd64/x86_64 -> x64, aarch64 -> arm64)"; exit 2;;
esac

Type guard

fn supported_arch(s: &str) -> bool {
    matches!(s, "x64" | "arm64" | "x86" | "loongarch64" | "riscv64")
}

Prevention

When it happens

Trigger: `mise lock -p linux-amd64`, `-p linux-aarch64`, `-p macos-x86_64`, or `-p linux-i686` — the arch segment is not in the allowlist.

Common situations: Copying target triples (x86_64-unknown-linux-gnu) or `uname -m` output (aarch64, amd64) directly into mise config; CI runners labeled aarch64 vs arm64 inconsistently.

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 jdx/mise@6f52dcdf99 (2026-08-22). Data as JSON: /api/errors/b4b99172b34166d7. Report an issue: GitHub.