{"record":{"id":"de273f007aeae583","repo":"jdx/mise","slug":"native-cargo-binary-artifact-did-not-contain","errorCode":null,"errorMessage":"native cargo binary artifact did not contain {}{}","messagePattern":"native cargo binary artifact did not contain (.+?)(.+?)","errorType":"exception","errorClass":"eyre::Report","httpStatus":null,"severity":"error","filePath":"src/backend/cargo/native_binstall.rs","lineNumber":189,"sourceCode":"            ctx.pr\n                .set_message(format!(\"download {}\", get_filename_from_url(&archive_url)));\n            download_native_binstall_file(&archive_url, &archive_path, Some(ctx.pr.as_ref()))\n                .await?;\n            file::create_dir_all(&extract_dir)?;\n            file::extract_archive(\n                &archive_path,\n                &extract_dir,\n                package_format.extraction_format.unwrap(),\n                &ExtractOptions {\n                    strip_components: 0,\n                    pr: Some(ctx.pr.as_ref()),\n                    preserve_mtime: true,\n                },\n            )?;\n            let Some(src) = find_native_bin(&extract_dir, binstall.bin_dir.as_deref(), &vars)?\n            else {\n                if bin.required_features.is_empty() {\n                    bail!(\n                        \"native cargo binary artifact did not contain {}{}\",\n                        bin.name,\n                        binary_ext\n                    );\n                }\n                debug!(\n                    \"native cargo binary artifact skipped optional bin {} requiring features {}\",\n                    bin.name,\n                    bin.required_features.join(\",\")\n                );\n                continue;\n            };\n            let dest = bin_root.join(format!(\"{}{}\", bin.name, binary_ext));\n            pending.push((src, dest));\n        }\n        validate_native_bin_sources(&pending)?;\n        if pending.is_empty() {\n            return Ok(false);","sourceCodeStart":171,"sourceCodeEnd":207,"githubUrl":"https://github.com/jdx/mise/blob/6f52dcdf99e282ef7a7db68c81301fa4618d0f79/src/backend/cargo/native_binstall.rs#L171-L207","documentation":"After cargo-binstall downloads and extracts a prebuilt release archive, mise searches the extraction dir for the expected binary named `{bin}{binary_ext}` (`.exe` on Windows). If the archive does not contain it and the bin is required (`required_features` is empty), the install aborts; optional bins (with required_features) are only skipped with a debug log.","triggerScenarios":"Installing a cargo: tool via binstall whose release archive for your platform does not contain the expected binary file — wrong bin_dir template in the crate's binstall metadata, archive built for a different OS/arch, or a bin-name mismatch between Cargo.toml and the shipped artifact.","commonSituations":"A crate publishes a Linux archive but mise on macOS resolves to it (or vice versa); crate renamed its binary between versions; musl vs glibc artifact variants; stale `[metadata.binstall]` in the crate pointing at an old archive layout.","solutions":["Pin a different version of the tool whose release artifacts are correct (`mise use cargo:tool@<version>`","Allow source compilation so `cargo install` builds the binary: set `cargo.binstall_only = false` or disable binstall for this install","Report the broken binstall metadata/archive layout to the crate upstream"],"exampleFix":"# before\nmise install cargo:mytool@latest\n# after\nmise settings set cargo.binstall false   # or pin a version with correct artifacts\nmise install cargo:mytool@0.9.1","handlingStrategy":"fallback","validationCode":"# check the crate's release assets for your platform before relying on binstall\ncurl -s https://api.github.com/repos/<owner>/<repo>/releases/latest | jq -r '.assets[].name'","typeGuard":null,"tryCatchPattern":"mise install cargo:tool || mise settings set cargo.binstall false && mise install cargo:tool","preventionTips":["Pin tested versions in mise.toml instead of `latest`","Keep cargo.binstall_only off unless you control the crate's release artifacts","CI: smoke-test `mise install` for every cargo tool you pin"],"tags":["cargo-binstall","artifact-extraction","missing-binary","platform-mismatch"],"backgroundTag":"artifact-binary-not-found","analyzedSha":"6f52dcdf99e282ef7a7db68c81301fa4618d0f79","analyzedAt":"2026-08-22T10:14:23.840Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}