jdx/mise · error
native cargo binary artifact did not contain
Error message
native cargo binary artifact did not contain {}{} What it means
During native cargo-binstall installation, mise downloads the crate's published binary artifact, extracts it, and locates each declared bin executable via find_native_bin. If a bin that requires no extra cargo features is missing from the artifact (path bin.name + binary_ext not found under bin_dir), the install is treated as corrupt and fails; feature-gated bins are skipped (debug) instead.
Solutions
- Reinstall or pin a different version of the crate whose artifact actually contains the expected binary.
- Check that the correct target-triple artifact was downloaded (verify rust target/platform matches your machine).
- If the crate needs custom features to produce the binary, install from source (disable binstall-only) since feature-gated bins are not in the prebuilt artifact.
- Report/fix the crate's binstall metadata (bin_dir, bin names) if it's wrong upstream.
Example fix
// before: expecting binary with custom features let _ = binstall.install(ctx, &tv).await?; // bin requires `ssl` feature // after: allow cargo install fallback so feature-gated binaries build let settings = Settings::get(); assert!(!settings.cargo.binstall_only, "feature-gated bins need cargo install");
Defensive patterns
Strategy: fallback
Validate before calling
# verify artifact contains expected binary before/after download tar -tzf artifact.tar.gz | grep -E '(^|/)mytool(\.exe)?$'
Try / catch
# shell mise install cargo:mytool@1.2 || mise settings set cargo.binstall_only false && mise install cargo:mytool@1.2
Prevention
- Clear mise caches after upstream re-publishes a release
- Match the artifact target triple to your host platform
- Avoid binstall_only for crates needing feature-gated binaries
When it happens
Trigger: install() on native_binstall path: the extracted artifact contains no file matching a required (non feature-gated) bin's expected name at the configured bin_dir/binary-ext.
Common situations: Upstream crate republished with renamed binaries; binstall metadata (bin_dir / binary ext) mismatched for the platform (e.g. .exe suffix logic); downloaded artifact for wrong target triple; tarball layout changed between releases.
Understand the failure class
Background: "File not found" and ENOENT errors: why libraries can't find a file that should exist — this error's family across 50 libraries.
Related errors
- cargo-binstall cannot honor cargo install-only tool…
- cargo-binstall is disabled, but cargo.binstall_only is set
- cargo-binstall is not available, but cargo.binstall_only is…
- native binstall metadata should have a package URL
- native cargo binary artifact maps multiple bins to
AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17).
Data as JSON: /api/errors/de273f007aeae583.
Report an issue: GitHub.
Appendix: 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 533346cc37)