{"record":{"id":"23287340fe2b55e4","repo":"BoundaryML/baml","slug":"unsupported-release-target-target-supported-targets","errorCode":null,"errorMessage":"unsupported release target `{target}`. Supported targets: {}","messagePattern":"unsupported release target `(.+?)`\\. Supported targets: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"baml_language/crates/baml_release/src/lib.rs","lineNumber":309,"sourceCode":"        (\"macos\", \"x86_64\", _) => Ok(\"x86_64-apple-darwin\"),\n        (\"linux\", \"aarch64\", true) => Ok(\"aarch64-unknown-linux-musl\"),\n        (\"linux\", \"aarch64\", false) => Ok(\"aarch64-unknown-linux-gnu\"),\n        (\"linux\", \"x86_64\", true) => Ok(\"x86_64-unknown-linux-musl\"),\n        (\"linux\", \"x86_64\", false) => Ok(\"x86_64-unknown-linux-gnu\"),\n        (\"windows\", \"x86_64\", _) => Ok(\"x86_64-pc-windows-msvc\"),\n        (\"windows\", \"aarch64\", _) => Ok(\"aarch64-pc-windows-msvc\"),\n        (os, arch, _) => anyhow::bail!(\n            \"no released BAML artifact is available for {arch}-{os}. \\\n             Install the matching toolchain via `baml toolchain install <version>`.\"\n        ),\n    }\n}\n\npub fn validate_release_target_triple(target: &str) -> Result<&str> {\n    if SUPPORTED_RELEASE_TARGETS.contains(&target) {\n        Ok(target)\n    } else {\n        anyhow::bail!(\n            \"unsupported release target `{target}`. Supported targets: {}\",\n            SUPPORTED_RELEASE_TARGETS.join(\", \")\n        )\n    }\n}\n\npub fn release_archive_filename(product: Product, version: &str, target: &str) -> String {\n    let ext = if target.ends_with(\"windows-msvc\") {\n        \"zip\"\n    } else {\n        \"tar.gz\"\n    };\n    format!(\"{}-{version}-{target}.{ext}\", product.tag_prefix())\n}\n\npub fn release_archive_url_for_repo(\n    product: Product,\n    version: &str,","sourceCodeStart":291,"sourceCodeEnd":327,"githubUrl":"https://github.com/BoundaryML/baml/blob/bd85ce9dee1463ff04d27efd20531013a4ff46c1/baml_language/crates/baml_release/src/lib.rs#L291-L327","documentation":"validate_release_target_triple checks a user-supplied target triple against the SUPPORTED_RELEASE_TARGETS list and returns it unchanged when valid. Unknown triples bail with this message that also lists every supported target. Used before fetching or recording artifacts so only known release targets are accepted.","triggerScenarios":"Passing a string not in SUPPORTED_RELEASE_TARGETS to validate_release_target_triple (e.g. a typo like \"x86_64-unknown-linux-gnu\" misspelled, \"x86_64-apple-darwin\", or an empty string).","commonSituations":"Typo in a CLI --target flag; copying a target triple from another project (macOS targets); using deprecated triple spellings (e.g. x86_64-unknown-linux-musl vs gnueabi variants).","solutions":["Use one of the triples listed in the error message verbatim.","Fix typos in the target argument (copy-paste from the supported list).","If you need an unlisted target, add it to SUPPORTED_RELEASE_TARGETS and publish an artifact for it.","Omit the target flag to let the library derive it from the host via release_host_target_triple."],"exampleFix":"// before\nvalidate_release_target_triple(\"x86_64-unknown-linux-gnuo\")?;\n// after\nvalidate_release_target_triple(\"x86_64-unknown-linux-gnu\")?;","handlingStrategy":"validation","validationCode":"const SUPPORTED: &[&str] = &[\"aarch64-unknown-linux-musl\",\"aarch64-unknown-linux-gnu\",\"x86_64-unknown-linux-musl\",\"x86_64-unknown-linux-gnu\",\"x86_64-pc-windows-msvc\",\"aarch64-pc-windows-msvc\"];\nassert!(SUPPORTED.contains(&target.as_str()), \"unsupported target {target}\");","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Copy target triples from the supported list instead of typing them.","Validate --target values in CLI arg parsing before calling library APIs.","Derive the target from the host automatically when possible."],"tags":["cli","target-triple","validation","invalid-cli-argument"],"backgroundTag":"invalid-enum-value","analyzedSha":"bd85ce9dee1463ff04d27efd20531013a4ff46c1","analyzedAt":"2026-09-12T03:38:25.718Z","contentChangedAt":"2026-09-12T03:38:25.718Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}