{"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":null,"httpStatus":null,"severity":"error","filePath":"src/backend/cargo.rs","lineNumber":307,"sourceCode":"                    {\n                        self.write_install_state_best_effort(&tv);\n                        return Ok(tv.clone());\n                    }\n                    Some(_) => {}\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":289,"sourceCodeEnd":325,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/backend/cargo.rs#L289-L325","documentation":"When cargo.binstall_only is set, `cargo install` is disallowed, so tool options that only cargo install understands (cargo_install_required_options, e.g. --features) cannot be honored by cargo-binstall's prebuilt-binary flow. mise detects this combination up front (for git-URL-free installs) and fails with the offending options listed.","triggerScenarios":"Installing cargo:<crate> with tool options that require cargo install (such as features=X) while cargo.binstall_only = true, the crate is not a git-URL install, and cargo_install_required_options is non-empty.","commonSituations":"User configures `cargo:mycrate = { version = '1.2', features = ['ssl'] }` (an option only meaningful for source builds) in a workspace where binstall_only is enforced; team policy file enabling binstall_only conflicts with per-tool feature options in mise.toml.","solutions":["Remove the cargo-install-only option(s) from the tool entry — the prebuilt binary doesn't support them (often a prebuilt-with-default-features binary is acceptable).","Set cargo.binstall_only = false so mise can run `cargo install` with the options.","If you need the feature-enabled build, build from source yourself or use a crate variant that ships the feature by default."],"exampleFix":"# before (mise.toml)\n[tools]\ncargo:ripgrep = { version = \"14\", features = \"pcre2\" }\n\n# after (with cargo.binstall_only = true)\n[tools]\ncargo:ripgrep = \"14\"  # prebuilt binary; install-only options removed","handlingStrategy":"validation","validationCode":"# audit tool options vs binstall_only\nif grep -q 'binstall_only = true' settings.toml && grep -qE 'features|options' mise.toml; then\n  echo 'install-only options present; drop them or disable binstall_only'\nfi","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Treat [tool-options]-style entries (features, flags) as cargo-install-only and avoid them under binstall_only","Prefer crates whose prebuilt binaries include needed features","Keep team settings and per-tool options reviewed together"],"tags":["cargo","binstall","tool-options","conflicting-config"],"backgroundTag":"conflicting-config-options","analyzedSha":"533346cc374382b41ec5ff70536252b2e96e725c","analyzedAt":"2026-09-17T13:35:38.149Z","contentChangedAt":"2026-09-17T13:35:38.149Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}