BoundaryML/baml · error
unsupported release target
Error message
unsupported release target `{target}`. Supported targets: {} What it means
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.
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.
Example fix
// before
validate_release_target_triple("x86_64-unknown-linux-gnuo")?;
// after
validate_release_target_triple("x86_64-unknown-linux-gnu")?; Defensive patterns
Strategy: validation
Validate before calling
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"];
assert!(SUPPORTED.contains(&target.as_str()), "unsupported target {target}"); Prevention
- 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.
When it happens
Trigger: 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).
Common situations: 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).
Understand the failure class
Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.
Related errors
- Cannot generate HIR/bytecode due to validation errors
- feedback field " " must be a string
- feedback needs a title; pass --title "..." or a JSON…
- feedback payload must be a JSON object like
- invalid Go SDK import path
AI-assisted analysis of BoundaryML/baml@bd85ce9dee (2026-09-12).
Data as JSON: /api/errors/23287340fe2b55e4.
Report an issue: GitHub.
Appendix: source
Thrown at baml_language/crates/baml_release/src/lib.rs:309
("macos", "x86_64", _) => Ok("x86_64-apple-darwin"),
("linux", "aarch64", true) => Ok("aarch64-unknown-linux-musl"),
("linux", "aarch64", false) => Ok("aarch64-unknown-linux-gnu"),
("linux", "x86_64", true) => Ok("x86_64-unknown-linux-musl"),
("linux", "x86_64", false) => Ok("x86_64-unknown-linux-gnu"),
("windows", "x86_64", _) => Ok("x86_64-pc-windows-msvc"),
("windows", "aarch64", _) => Ok("aarch64-pc-windows-msvc"),
(os, arch, _) => anyhow::bail!(
"no released BAML artifact is available for {arch}-{os}. \
Install the matching toolchain via `baml toolchain install <version>`."
),
}
}
pub fn validate_release_target_triple(target: &str) -> Result<&str> {
if SUPPORTED_RELEASE_TARGETS.contains(&target) {
Ok(target)
} else {
anyhow::bail!(
"unsupported release target `{target}`. Supported targets: {}",
SUPPORTED_RELEASE_TARGETS.join(", ")
)
}
}
pub fn release_archive_filename(product: Product, version: &str, target: &str) -> String {
let ext = if target.ends_with("windows-msvc") {
"zip"
} else {
"tar.gz"
};
format!("{}-{version}-{target}.{ext}", product.tag_prefix())
}
pub fn release_archive_url_for_repo(
product: Product,
version: &str,View on GitHub (pinned to bd85ce9dee)