From 6ce2294938b696a4f2086ef26fef0e58cdbaf23d Mon Sep 17 00:00:00 2001 From: Xianpeng Shen <3353385+shenxianpeng@users.noreply.github.com> Date: Thu, 29 Oct 2026 21:35:26 +0000 Subject: [PATCH] fix: make `cargo install clang-tools-manager --features bin` work The `bin` feature did not enable tokio's multi-threaded runtime (needed by `#[tokio::main]`) nor a TLS backend for reqwest. So the `clang-tools` binary only compiled within the workspace, where cpp-linter enables both. Installing the crate on its own failed to compile, and a build without TLS could not download anything. Also fix the cargo-binstall URL: release assets are named `clang-tools-`, not `clang-tools-manager-`. --- clang-tools-manager/Cargo.toml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/clang-tools-manager/Cargo.toml b/clang-tools-manager/Cargo.toml index ce9479ca..20fcd3b7 100644 --- a/clang-tools-manager/Cargo.toml +++ b/clang-tools-manager/Cargo.toml @@ -47,7 +47,7 @@ tempfile = { workspace = true } tokio = { workspace = true, features = ["macros", "rt-multi-thread"] } [features] -bin = ["dep:clap", "dep:tokio", "dep:anyhow", "dep:colored"] +bin = ["dep:clap", "dep:tokio", "tokio/rt-multi-thread", "reqwest/default-tls", "dep:anyhow", "dep:colored"] [build-dependencies] serde = { workspace = true } @@ -55,4 +55,5 @@ serde_json = { workspace = true } reqwest = { workspace = true, features = ["default-tls", "blocking"] } [package.metadata.binstall] -pkg-url = "{ repo }/releases/download/clang-tools-manager/v{ version }/{ name }-{ target }{ archive-suffix }" +pkg-url = "{ repo }/releases/download/clang-tools-manager/v{ version }/clang-tools-{ target }{ archive-suffix }" +bin-dir = "{ bin }{ binary-ext }"