BoundaryML/baml · error
no released BAML artifact is available for {arch}-{os}. Inst
Error message
no released BAML artifact is available for {arch}-{os}. Install the matching toolchain via `baml toolchain install <version>`. What it means
release_host_target_triple maps the current OS/arch (and musl flag) to a released Rust target triple. If the host combination is not one of the known linux/windows x86_64/aarch64 targets, it bails with this message telling the user to install the matching toolchain manually. It guards against attempting a self-update/download on an unsupported platform.
Source
Thrown at baml_language/crates/baml_release/src/lib.rs:298
.unwrap_or_else(|| DEFAULT_RELEASE_REPO.to_string())
}
pub fn release_host_target_triple() -> Result<&'static str> {
#[cfg(target_env = "musl")]
const IS_MUSL: bool = true;
#[cfg(not(target_env = "musl"))]
const IS_MUSL: bool = false;
match (std::env::consts::OS, std::env::consts::ARCH, IS_MUSL) {
("macos", "aarch64", _) => Ok("aarch64-apple-darwin"),
("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 {View on GitHub (pinned to bd85ce9dee)
Solutions
- Run baml on a supported target: linux or windows on x86_64 or aarch64.
- Install the toolchain manually via `baml toolchain install <version>` as the message suggests.
- Check `uname -m`/`uname -s` and, if a container reports an unexpected arch, use an official image for a supported arch.
- Request/file support for the missing target triple upstream.
Example fix
// unsupported host // linux-armv7 container // after: use a supported base image FROM --platform=linux/amd64 alpine:latest
Defensive patterns
Strategy: validation
Validate before calling
let (os, arch) = (std::env::consts::OS, std::env::consts::ARCH);
let supported = matches!((os, arch),
("linux", "x86_64") | ("linux", "aarch64") | ("windows", "x86_64") | ("windows", "aarch64"));
if !supported { /* fall back to manual toolchain install */ } Prevention
- Check the supported target matrix before enabling self-update on a platform.
- In containers, pin images to supported architectures (--platform=linux/amd64).
- Provide a manual `baml toolchain install` path for unsupported hosts.
When it happens
Trigger: Calling release_host_target_triple on an OS outside {linux, windows} or an arch outside {x86_64, aarch64} — e.g. macOS, FreeBSD, armv7, riscv64 hosts.
Common situations: Running baml self-update inside an Alpine/FreeBSD container with an odd uname, on Raspberry Pi 32-bit, or on macOS where releases aren't published under these triples.
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
- self-update is disabled in this build. Update BAML with your
- usage: baml --replace <tmp> <current>
- failed to replace {} with {}: {}
- unsupported pack target `{target}`. {err}
- unsupported pack target `{target_triple}`
AI-assisted analysis of BoundaryML/baml@bd85ce9dee (2026-09-12).
Data as JSON: /api/errors/02399cd4bf1b1423.
Report an issue: GitHub.