Skip to content

Commit

Permalink
use semver depdency only when component-model is enabled (#1907)
Browse files Browse the repository at this point in the history
I have looked up where the `semver` dependency is actually used in `wasmparser` and it seems to me that the only location where it actually is used is not primarily in the validator but in the component-model ComponentNameParser. This helps to reduce compile time further when `component-model` is disabled.
  • Loading branch information
Robbepop authored Nov 14, 2024
1 parent a280f52 commit 9cbf253
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/wasmparser/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ prefer-btree-collections = []
# A feature that enables validating WebAssembly files. This is enabled by
# default but not required if you're only parsing a file, for example, as
# opposed to validating all of its contents.
validate = ['dep:semver']
validate = []

# Enable Serialize/Deserialize implementations for types in
# `wasmparser::collections`
Expand All @@ -81,4 +81,4 @@ features = []
# A feature that enables parsing and validating the component-model proposal for
# WebAssembly. This is enabled by default but if your use case is only
# interested in working with core modules then this feature can be disabled.
component-model = []
component-model = ['dep:semver']

0 comments on commit 9cbf253

Please sign in to comment.