{"record":{"id":"8b6a54c60017b483","repo":"tauri-apps/tauri","slug":"unexpected-target-triple","errorCode":null,"errorMessage":"Unexpected target triple {}","messagePattern":"Unexpected target triple (.+?)","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tauri-bundler/src/bundle/settings.rs","lineNumber":1051,"sourceCode":"\n  /// Returns the architecture for the binary being bundled (e.g. \"arm\", \"x86\" or \"x86_64\").\n  pub fn binary_arch(&self) -> Arch {\n    if self.target.starts_with(\"x86_64\") {\n      Arch::X86_64\n    } else if self.target.starts_with('i') {\n      Arch::X86\n    } else if self.target.starts_with(\"arm\") && self.target.ends_with(\"hf\") {\n      Arch::Armhf\n    } else if self.target.starts_with(\"arm\") {\n      Arch::Armel\n    } else if self.target.starts_with(\"aarch64\") {\n      Arch::AArch64\n    } else if self.target.starts_with(\"riscv64\") {\n      Arch::Riscv64\n    } else if self.target.starts_with(\"universal\") {\n      Arch::Universal\n    } else {\n      panic!(\"Unexpected target triple {}\", self.target)\n    }\n  }\n\n  /// Returns the file name of the binary being bundled.\n  pub fn main_binary(&self) -> crate::Result<&BundleBinary> {\n    self\n      .binaries\n      .iter()\n      .find(|bin| bin.main)\n      .context(\"failed to find main binary, make sure you have a `package > default-run` in the Cargo.toml file\")\n  }\n\n  /// Returns the file name of the binary being bundled.\n  pub fn main_binary_mut(&mut self) -> crate::Result<&mut BundleBinary> {\n    self\n      .binaries\n      .iter_mut()\n      .find(|bin| bin.main)","sourceCodeStart":1033,"sourceCodeEnd":1069,"githubUrl":"https://github.com/tauri-apps/tauri/blob/52e4b6e71d8632a7e648f866c442e287ecddee34/crates/tauri-bundler/src/bundle/settings.rs#L1033-L1069","documentation":"Panic in tauri-bundler's Settings::arch()/target parsing. It maps the --target triple to a bundle Arch by prefix matching (x86_64/x86, arm...hf, arm, aarch64, riscv64, universal); any triple that matches none of those prefixes panics with 'Unexpected target triple'.","triggerScenarios":"Running `tauri build --target <triple>` for an architecture the bundler does not know, e.g. loongarch64-unknown-linux-gnu, powerpc64le-unknown-linux-gnu, or a misspelled triple like x64_64-unknown-linux-gnu / aarch64-apple-darwin-vs-'arm64-apple-darwin' variants the matcher does not cover.","commonSituations":"Cross-compiling to niche or newly added Rust targets; typos in CI matrix definitions; using an older tauri-cli whose prefix list predates a newer target.","solutions":["Use a supported target triple (x86_64/i686, armv7 (arm...hf) / armel, aarch64, riscv64, or universal for macOS)","Omit --target to bundle for the host architecture while you sort out cross-compilation","Upgrade @tauri-apps/cli / tauri-cli — newly supported architectures are added over time"],"exampleFix":"# before\nnpm run tauri build -- --target loongarch64-unknown-linux-gnu  # panic: Unexpected target triple\n\n# after\nnpm run tauri build -- --target aarch64-unknown-linux-gnu   # supported prefix\n# or bundle for host:\nnpm run tauri build","handlingStrategy":"validation","validationCode":"# validate the triple before invoking the bundler\nSUPPORTED='^(x86_64|i686|arm|aarch64|riscv64|universal)'\necho \"$TARGET\" | grep -Eq \"$SUPPORTED\" || { echo \"unsupported target: $TARGET\"; exit 1; }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Pin the small set of targets your CI actually builds and fail fast on others","Copy target triples from `rustc --print target-list` output rather than typing them","Upgrade @tauri-apps/cli when adopting new architectures"],"tags":["tauri-bundler","target-triple","cross-compilation","build"],"backgroundTag":"unsupported-target-triple","analyzedSha":"52e4b6e71d8632a7e648f866c442e287ecddee34","analyzedAt":"2026-08-20T13:59:20.734Z","schemaVersion":2},"datasetVersion":"2026-08-31T22:30:34.772Z"}