From 97f640883f3657631aa5d448772a8f80dc13f49f Mon Sep 17 00:00:00 2001 From: Skorobogaty Dmitry Date: Sat, 25 Oct 2025 22:54:55 +0400 Subject: [PATCH 1/2] enable default features for clap in the bin crate member --- {{project-name}}/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{project-name}}/Cargo.toml b/{{project-name}}/Cargo.toml index 5b34957..39e8586 100644 --- a/{{project-name}}/Cargo.toml +++ b/{{project-name}}/Cargo.toml @@ -22,7 +22,7 @@ tokio = { workspace = true, features = [ "signal", ] } {% if program_types_with_opts contains program_type -%} -clap = { workspace = true, features = ["derive"] } +clap = { workspace = true, default-features = true, features = ["derive"] } {% endif -%} [build-dependencies] From a92a68830f9c0176f974edca7e05c7d2361477e8 Mon Sep 17 00:00:00 2001 From: Skorobogaty Dmitry Date: Tue, 25 Nov 2025 15:37:56 +0400 Subject: [PATCH 2/2] enable just specific features required to show help --- {{project-name}}/Cargo.toml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/{{project-name}}/Cargo.toml b/{{project-name}}/Cargo.toml index 39e8586..a4c407a 100644 --- a/{{project-name}}/Cargo.toml +++ b/{{project-name}}/Cargo.toml @@ -22,7 +22,11 @@ tokio = { workspace = true, features = [ "signal", ] } {% if program_types_with_opts contains program_type -%} -clap = { workspace = true, default-features = true, features = ["derive"] } +clap = { workspace = true, default-features = false, features = [ + "derive", + "help", + "usage" +] } {% endif -%} [build-dependencies]