Cargo Features

[dependencies]
wasmparser = { version = "0.222.0", default-features = false, features = ["std", "hash-collections", "prefer-btree-collections", "validate", "serde", "features", "component-model", "simd"] }
default = component-model, features, hash-collections, serde, simd, std, validate

These default features are set whenever wasmparser is added without default-features = false somewhere in the dependency tree.

std default

A feature which enables implementations of std::error::Error as appropriate along with other convenience APIs. This additionally uses the standard library's source of randomness for seeding hash maps.

Enables std of optional indexmap

hash-collections default

Tells the wasmparser crate to provide (and use) hash-based collections internally.

Disabling this crate feature allows to drop hashbrown, indexmap dependencies entirely, reducing compilation times and shrink binary sizes.

Enables hashbrown and indexmap

Affects collections::hash

prefer-btree-collections

Tells the wasmparser crate to prefer using its built-in btree-based collections even if hash-collections is enabled.

validate default

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.

Affects wasmparser::collections

serde default

Enable Serialize/Deserialize implementations for types in wasmparser::collections

Enables serde, serde of optional hashbrown and optional indexmap

features default

A feature that enables the guts of the WasmFeatures type in this crate.

This feature is enabled by default. When disabled this crate does not support runtime configuration of WebAssembly features. Instead the set of WebAssembly features/proposals support are fixed at compile time to wasmparser's default set of supported features.

component-model default

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.

Enables semver

Affects validator::component_types, validator::names

simd default

A feature that enables parsing and validating the simd and relaxed-simd proposals for WebAssembly. This is enabled by default but if your use case is only interested in working on non-SIMD code then this feature can be disabled.

Affects operators::VisitOperator.simd_visitor, operators::VisitSimdOperator