{"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":"critical","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/460ec35447493200d64290dd7f015d5a91d0fd58/crates/tauri-bundler/src/bundle/settings.rs#L1033-L1069","documentation":"BundleSettings::arch() parses the Rust target triple to pick the bundle architecture. If the triple's prefix matches none of the known architectures (x86_64, x86, aarch64, riscv64, universal), the bundler panics with this message.","triggerScenarios":"cargo-tauri build/bundle invoked with --target set to an unsupported triple (or TARGET env in cross-compilation) whose prefix is not one of the recognized architecture prefixes in settings.rs.","commonSituations":"Cross-compiling to an exotic target (armv7, mips, loongarch64); typo'd or custom-built target triple; a newly used toolchain target the bundler version doesn't map yet.","solutions":["Build for a supported architecture: x86_64-*, x86_*/i?86-*, aarch64-*, riscv64-*, or universal-apple-darwin","If you need a new arch, patch the bundler (crates/tauri-bundler/src/bundle/settings.rs) to map its prefix to an Arch variant","Check for typos in --target and verify the triple with `rustup target list` / `rustc -vV`"],"exampleFix":"// before\ncargo tauri build --target armv7-unknown-linux-gnueabihf\n// after\ncargo tauri build --target aarch64-unknown-linux-gnu  # supported triple","handlingStrategy":"validation","validationCode":"const TARGET = process.env.TARGET;\nconst SUPPORTED = /^(x86_64|x86|aarch64|riscv64|universal)/;\nif (!SUPPORTED.test(TARGET)) throw new Error(`unsupported target: ${TARGET}`);","typeGuard":"function isSupportedTarget(t: string): boolean {\n  return /^(x86_64|x86|aarch64|riscv64|universal)/.test(t);\n}","tryCatchPattern":null,"preventionTips":["Only pass --target values from the supported arch list (x86_64, x86, aarch64, riscv64, universal)","Validate CI matrix target triples against the supported list","Pin cross-compilation targets in rust-toolchain.toml to known-good triples"],"tags":["tauri","bundler","cross-compilation","panic","target-triple"],"backgroundTag":"unsupported-enum-value","analyzedSha":"460ec35447493200d64290dd7f015d5a91d0fd58","analyzedAt":"2026-09-18T23:55:51.277Z","contentChangedAt":"2026-09-18T23:55:51.277Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}