this post was submitted on 14 Apr 2026
1 points (100.0% liked)

Rust Programming

9262 readers
1 users here now

founded 7 years ago
MODERATORS
 
[features]
default = ["runtime_completion_gen", "comptime_completion_gen", "comptime_manpage_gen"]
runtime_completion_gen = ["dep:clap_complete",]
comptime_completion_gen = ["dep:clap_complete"]
comptime_manpage_gen = ["dep:clap_mangen"]

[dependencies]
anyhow = "1.0.0"
clap = { version = "4.0.0", features = ["derive", "help"] }
clap_complete = { version = "4.0.0", optional = true }
ignore = "0.4.25"

[build-dependencies]
clap = { version = "4.0.0", features = ["derive"] }
clap_complete = { version = "4.0.0", optional = true }
clap_mangen = { version = "0.2.31", optional = true }

The features that start with comptime, as their name suggest, happen at comp time in build.rs, they generate shell completions and manpages for my cli utility, thus they depend only at build time to their respective dependencies, but there seems no way to specify this.

Does anyone know if there is a way to specify build deps for a feature?

no comments (yet)
sorted by: hot top controversial new old
there doesn't seem to be anything here