{"record":{"id":"fafe1b3a5d2456f2","repo":"BoundaryML/baml","slug":"target-target-not-built-for-wrapper","errorCode":null,"errorMessage":"target {target} not built for wrapper {}","messagePattern":"target (.+?) not built for wrapper (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"baml_language/crates/baml_release/src/manifest.rs","lineNumber":122,"sourceCode":"    }\n\n    pub fn artifact_for_target(&self, target: &str) -> anyhow::Result<&Artifact> {\n        self.artifacts.get(target).ok_or_else(|| {\n            anyhow::anyhow!(\"target {target} not built for version {}\", self.version)\n        })\n    }\n}\n\n#[cfg(all(feature = \"self-update\", not(feature = \"no-self-update\")))]\nimpl WrapperManifest {\n    pub fn validate(&self) -> anyhow::Result<()> {\n        validate_schema(self.schema)?;\n        validate_artifacts(&self.version, &self.artifacts)\n    }\n\n    pub fn artifact_for_target(&self, target: &str) -> anyhow::Result<&Artifact> {\n        self.artifacts.get(target).ok_or_else(|| {\n            anyhow::anyhow!(\"target {target} not built for wrapper {}\", self.version)\n        })\n    }\n}\n\nfn validate_schema(schema: u32) -> anyhow::Result<()> {\n    if schema > MANIFEST_SCHEMA {\n        anyhow::bail!(\n            \"manifest schema {schema} is newer than this wrapper; run `baml self-update`\"\n        );\n    }\n    if schema != MANIFEST_SCHEMA {\n        anyhow::bail!(\"unsupported manifest schema {schema}\");\n    }\n    Ok(())\n}\n\nfn validate_artifacts(version: &str, artifacts: &BTreeMap<String, Artifact>) -> anyhow::Result<()> {\n    let expected: std::collections::BTreeSet<_> =","sourceCodeStart":104,"sourceCodeEnd":140,"githubUrl":"https://github.com/BoundaryML/baml/blob/bd85ce9dee1463ff04d27efd20531013a4ff46c1/baml_language/crates/baml_release/src/manifest.rs#L104-L140","documentation":"WrapperManifest::artifact_for_target performs the same lookup as the release manifest version but against the wrapper's own artifact map, reporting \"target {target} not built for wrapper {version}\" when absent. The wrapper manifest ships the binaries bundled with a specific wrapper release, so a missing entry means that wrapper version never included the requested target.","triggerScenarios":"Calling artifact_for_target on a WrapperManifest for a target absent from its artifacts — requesting a platform the wrapper build didn't embed, or a mistyped target string.","commonSituations":"Older wrapper installs queried for targets added later; Docker images built for one arch asked to serve another; typos in toolchain/config files.","solutions":["Use a target present in the wrapper's artifacts map.","Update the wrapper (`baml self-update`) to a version that includes the target.","Correct any typo in the target argument.","Add the target to the wrapper build matrix if you own packaging."],"exampleFix":"// before\nwrapper.artifact_for_target(\"x86_64-pc-windows-msvc\")?; // wrapper built only for linux\n// after\nbaml self-update;\nwrapper.artifact_for_target(\"x86_64-pc-windows-msvc\")?;","handlingStrategy":"fallback","validationCode":"if !wrapper.artifacts.contains_key(target) {\n    eprintln!(\"wrapper {} lacks {}; run baml self-update\", wrapper.version);\n}","typeGuard":null,"tryCatchPattern":"match wrapper.artifact_for_target(target) {\n    Err(_) => { run_self_update(); retry_with_fresh_wrapper(); }\n    ok => ok,\n}","preventionTips":["Keep the wrapper up to date so its bundled artifacts cover your target.","Check the wrapper's artifact list before requesting an embedded binary.","Match wrapper builds to deployment architectures in packaging pipelines."],"tags":["manifest","wrapper","target-triple","not-found"],"backgroundTag":"resource-not-found","analyzedSha":"bd85ce9dee1463ff04d27efd20531013a4ff46c1","analyzedAt":"2026-09-12T03:38:25.718Z","contentChangedAt":"2026-09-12T03:38:25.718Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}