Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project follows Semantic Versioning.

## [Unreleased]

### Changed
- `clap` is optional, behind a new default `cli` feature that also gates the `webnn-graph` binary;
`--no-default-features` builds the library without it.

## [0.4.0] - 2026-10-15

### Added
Expand Down
6 changes: 4 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ path = "src/lib.rs"
[[bin]]
name = "webnn-graph"
path = "src/main.rs"
required-features = ["cli"]

[features]
default = ["onnx"]
default = ["onnx", "cli"]
cli = ["dep:clap"]
onnx = ["dep:webnn-onnx-utils", "dep:prost"]

[dependencies]
Expand All @@ -30,7 +32,7 @@ half = "2.7.1"
thiserror = "1.0"
pest = "2.7"
pest_derive = "2.7"
clap = { version = "4.5", features = ["derive"] }
clap = { version = "4.5", features = ["derive"], optional = true }
base64 = "0.22"
prost = { version = "0.12", optional = true }
webnn-onnx-utils = { version = "0.1.1", optional = true }
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ cargo build
cargo test
```

ONNX conversion is enabled by the default `onnx` feature. Build only the parser, serializer, validators,
emitters, and weight utilities with:
ONNX conversion is enabled by the default `onnx` feature, and the `webnn-graph` binary by the default `cli`
feature (which pulls in `clap`). Build only the parser, serializer, validators, emitters, and weight utilities
with:

```bash
cargo build --no-default-features
Expand Down