{"record":{"id":"4690322ccccb5769","repo":"jdx/mise","slug":"cargo-binstall-cannot-honor-cargo-install-only-too","errorCode":null,"errorMessage":"cargo-binstall cannot honor cargo install-only tool option(s): {options}\nhint: Remove the option(s), or disable cargo.binstall_only to allow cargo install","messagePattern":"cargo-binstall cannot honor cargo install-only tool option\\(s\\): (.+?)\nhint: Remove the option\\(s\\), or disable cargo\\.binstall_only to allow cargo install","errorType":"validation","errorClass":"eyre::Report","httpStatus":null,"severity":"error","filePath":"src/backend/cargo.rs","lineNumber":308,"sourceCode":"                            self.write_install_state_best_effort(&tv);\n                            return Ok(tv.clone());\n                        }\n                    }\n                    Some(false) => {}\n                    None if native_binstall::rollout_warning_active() => {\n                        self.native_binstall(ctx, &tv, NativeBinstallAction::WarnOnly)\n                            .await?;\n                    }\n                    None => {}\n                },\n                _ => {}\n            }\n        } else if Settings::get().cargo.binstall_only\n            && self.git_url().is_none()\n            && !cargo_install_required_options.is_empty()\n        {\n            let options = format_tool_options(&cargo_install_required_options);\n            bail!(\n                \"cargo-binstall cannot honor cargo install-only tool option(s): {options}\\n\\\n                hint: Remove the option(s), or disable cargo.binstall_only to allow cargo install\"\n            );\n        } else if !cargo_install_required_options.is_empty() {\n            let options = format_tool_options(&cargo_install_required_options);\n            info!(\n                \"not using cargo-binstall because cargo install-only tool option(s) are specified: {options}\"\n            );\n        }\n\n        let mut cmd = CmdLineRunner::new(\n            self.spawn_program(&ctx.config, Some(&ctx.ts), \"cargo\")\n                .await,\n        )\n        .arg(\"install\");\n        if let Some(url) = self.git_url() {\n            cmd = cmd.arg(format!(\"--git={url}\"));\n            if let Some(rev) = tv.version.strip_prefix(\"rev:\") {","sourceCodeStart":290,"sourceCodeEnd":326,"githubUrl":"https://github.com/jdx/mise/blob/6f52dcdf99e282ef7a7db68c81301fa4618d0f79/src/backend/cargo.rs#L290-L326","documentation":"mise's cargo backend prefers installing prebuilt binaries via cargo-binstall. Some tool options only take effect when compiling from source with `cargo install`: specifically `features` (non-empty) and `default-features = false` (src/backend/cargo.rs:454-469). When the setting `cargo.binstall_only = true` forbids source compilation and the tool carries such options, mise cannot honor them, so it fails up front instead of silently installing a binary without the requested features.","triggerScenarios":"Settings contain `cargo.binstall_only = true`, the cargo tool has no git_url, and `cargo_install_required_options()` returns a non-empty list — i.e. the tool version options include `features = \"...\"` or `default-features = false`. The bail fires in install() before any download.","commonSituations":"Users enable cargo.binstall_only for speed or to force prebuilt binaries in CI, while a mise.toml entry like `[tools.\"cargo:somecrate\"] features = [\"full\"]` still requests source-only compilation. Also hits after upgrading mise when binstall_only behavior tightened.","solutions":["Remove `features`/`default-features` options from the cargo tool entry in mise.toml","Set `cargo.binstall_only = false` (or remove it) in settings so mise falls back to `cargo install` from source","Switch to a prebuilt variant/backend that already includes the features you need (e.g. aqua: or github: backend for the same tool)"],"exampleFix":"# before (mise.toml)\n[settings.cargo]\nbinstall_only = true\n[tools.\"cargo:bat\"]\nfeatures = [\"build-assets\"]\n# after\n[settings.cargo]\nbinstall_only = true\n[tools]\nbat = \"latest\"","handlingStrategy":"validation","validationCode":"# before enabling cargo.binstall_only, assert no source-only options are set\ngrep -nE 'features|default-features' mise.toml && echo 'remove these options or keep binstall_only off'","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep source-only options (features, default-features=false) out of cargo: tool entries when cargo.binstall_only is true","Test the full toolset in CI with the same settings users run locally","Document per-team which cargo options are binstall-compatible"],"tags":["cargo","cargo-binstall","tool-options","config-conflict"],"backgroundTag":"unsupported-option-combination","analyzedSha":"6f52dcdf99e282ef7a7db68c81301fa4618d0f79","analyzedAt":"2026-08-22T10:14:23.840Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}