jdx/mise · error · eyre::Report

native cargo binary artifact did not contain {}{}

Error message

native cargo binary artifact did not contain {}{}

What it means

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.

Source

Thrown at src/backend/cargo/native_binstall.rs:189

            ctx.pr
                .set_message(format!("download {}", get_filename_from_url(&archive_url)));
            download_native_binstall_file(&archive_url, &archive_path, Some(ctx.pr.as_ref()))
                .await?;
            file::create_dir_all(&extract_dir)?;
            file::extract_archive(
                &archive_path,
                &extract_dir,
                package_format.extraction_format.unwrap(),
                &ExtractOptions {
                    strip_components: 0,
                    pr: Some(ctx.pr.as_ref()),
                    preserve_mtime: true,
                },
            )?;
            let Some(src) = find_native_bin(&extract_dir, binstall.bin_dir.as_deref(), &vars)?
            else {
                if bin.required_features.is_empty() {
                    bail!(
                        "native cargo binary artifact did not contain {}{}",
                        bin.name,
                        binary_ext
                    );
                }
                debug!(
                    "native cargo binary artifact skipped optional bin {} requiring features {}",
                    bin.name,
                    bin.required_features.join(",")
                );
                continue;
            };
            let dest = bin_root.join(format!("{}{}", bin.name, binary_ext));
            pending.push((src, dest));
        }
        validate_native_bin_sources(&pending)?;
        if pending.is_empty() {
            return Ok(false);

View on GitHub (pinned to 6f52dcdf99)

Solutions

  1. Pin a different version of the tool whose release artifacts are correct (`mise use cargo:tool@<version>`
  2. Allow source compilation so `cargo install` builds the binary: set `cargo.binstall_only = false` or disable binstall for this install
  3. Report the broken binstall metadata/archive layout to the crate upstream

Example fix

# before
mise install cargo:mytool@latest
# after
mise settings set cargo.binstall false   # or pin a version with correct artifacts
mise install cargo:mytool@0.9.1
Defensive patterns

Strategy: fallback

Validate before calling

# check the crate's release assets for your platform before relying on binstall
curl -s https://api.github.com/repos/<owner>/<repo>/releases/latest | jq -r '.assets[].name'

Try / catch

mise install cargo:tool || mise settings set cargo.binstall false && mise install cargo:tool

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of jdx/mise@6f52dcdf99 (2026-08-22). Data as JSON: /api/errors/de273f007aeae583. Report an issue: GitHub.