Skip to content

Make clap optional behind a default cli feature - #26

Open
padenot wants to merge 1 commit into
rustnn:mainfrom
padenot:optional-cli
Open

padenot wants to merge 1 commit into
rustnn:mainfrom
padenot:optional-cli

Conversation

@padenot

@padenot padenot commented Oct 21, 2026 •

Copy link
Copy Markdown

Only the webnn-graph binary uses clap, but it was an unconditional dependency, so library consumers have to compile it.

  • New default cli feature enabling clap; the binary is gated on it with required-features.
  • Default builds are unchanged; --no-default-features builds the library without clap.
  • README and CHANGELOG updated.

Validation (rustc 1.97.0): cargo fmt --check, cargo clippy --all-targets -- -D warnings with and without --no-default-features, cargo test with and without --no-default-features, cargo build (binary still produced). cargo tree --no-default-features -i clap finds no clap.

Companion to rustnn/rustnn#328, which does the same for rustnn.

Only the webnn-graph binary uses clap, but it was an unconditional
dependency, so library consumers compiled it. Add a default `cli` feature
enabling clap and gate the binary on it with `required-features`. Default
builds are unchanged; `--no-default-features` now builds the library
without clap.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant