BoundaryML/baml · error · FetchError

target {target} not built for version {version}

Error message

target {target} not built for version {version}

What it means

FetchError::TargetNotInManifest is thrown by baml_release when the release manifest for the requested version exists but contains no entry for the requested target (platform/architecture triple). It means that specific version was never built (or is no longer published) for your platform.

Source

Thrown at baml_language/crates/baml_release/src/lib.rs:89

            Product::Wrapper => "baml-wrapper",
        }
    }
}

#[derive(Debug, thiserror::Error)]
pub enum FetchError {
    #[error("network error fetching {url}: {source}")]
    Network { url: String, source: reqwest::Error },
    #[error("HTTP {status} fetching {url}")]
    HttpStatus {
        url: String,
        status: reqwest::StatusCode,
    },
    #[error("manifest 404 for version {version} (not released yet?)")]
    ManifestNotFound { version: String },
    #[error("manifest schema {got} not supported (max {max}); run `baml self-update`")]
    ManifestSchemaTooNew { got: u32, max: u32 },
    #[error("target {target} not built for version {version}")]
    TargetNotInManifest { target: String, version: String },
    #[error("sha256 mismatch for {url}: expected {expected}, got {got}")]
    ChecksumMismatch {
        url: String,
        expected: String,
        got: String,
    },
    #[error("archive missing expected binary {name}")]
    BinaryNotInArchive { name: String },
    #[error("archive contains unsafe path {path}")]
    UnsafeArchivePath { path: String },
    #[error("disk error: {0}")]
    Io(#[from] std::io::Error),
    #[error("zip archive error: {0}")]
    Zip(#[from] zip::result::ZipError),
}

#[derive(Debug, Clone)]

View on GitHub (pinned to bd85ce9dee)

Solutions

  1. Pick a newer version of the tool that includes builds for your target
  2. Verify your target triple with `uname -m` / rustc -vV and confirm the release page lists it
  3. If on an unsupported platform, build from source or use a container with a supported target
  4. Check the version's published artifacts list to confirm which targets exist

Example fix

# before (aarch64 linux, old version had no arm builds)
$ baml install --version 0.1.0
target aarch64-unknown-linux-gnu not built for version 0.1.0
# after
$ baml install --version 0.204.0
Defensive patterns

Strategy: validation

Validate before calling

let my_target = target_triple(); // e.g. aarch64-unknown-linux-gnu
let entry = manifest.targets.get(&my_target);
if entry.is_none() {
    eprintln!("version {v} has no build for {my_target}; pick another version");
}

Type guard

fn is_target_missing(e: &FetchError) -> bool {
    matches!(e, FetchError::TargetNotInManifest { .. })
}

Try / catch

match install(v) {
    Err(FetchError::TargetNotInManifest { target, version }) => {
        eprintln!("{target} not built for {version}; trying newer version");
        install_latest()
    }
    other => other,
}

Prevention

When it happens

Trigger: Calling an install/fetch API with a version whose manifest lacks the current target triple (e.g. requesting a very old version that did not yet ship aarch64-apple-darwin, or linux-musl builds).

Common situations: Installing an old BAML version on newer platforms (e.g. Apple Silicon before darwin-arm64 builds existed), using an unusual target like a musl or FreeBSD triple, CI matrices pinning versions predating platform support.

Understand the failure class

Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.

Related errors


AI-assisted analysis of BoundaryML/baml@bd85ce9dee (2026-09-12). Data as JSON: /api/errors/ad098acb51df87fd. Report an issue: GitHub.