Cargo Features

[dependencies]
wasm-tools = { version = "1.226.0", default-features = false, features = ["validate", "parse", "smith", "shrink", "mutate", "objdump", "strip", "compose", "demangle", "component", "metadata", "wit-smith", "addr2line", "completion", "json-from-wast"] }
default = addr2line, completion, component, compose, demangle, dump, json-from-wast, metadata, mutate, objdump, parse, print, shrink, smith, strip, validate, wit-smith

By default, all subcommands are built

validate default = rayon

Each subcommand is gated behind a feature and lists the dependencies it needs

Enables features and validate of wasmparser and addr2line

Dependencies of addr2line

and bitflags and gimli

bitflags:

Dependencies of validate

Affects wasm-tools::addr2line

print parse default
smith default = arbitrary, wasm-smith

Enables serde, serde_derive, and serde_json

shrink default = is_executable, wasm-shrink
mutate default = wasm-mutate
dump objdump default

Enables wasmparser

strip default = regex, wasm-encoder

Enables wasmparser

compose default = wasm-compose

Enables wasmparser

demangle default = cpp_demangle, rustc-demangle, wasm-encoder

Enables wasmparser

component default = wasm-encoder, wit-component, wit-encoder, wit-parser

Enables serde_json, wasmparser, and wast

wast:

Dependencies of component

metadata default = wasm-metadata

Enables serde_json and wasmparser

wit-smith default = arbitrary

Enables wit-smith

Dependencies of wit-smith

addr2line default

Enables addr2line, gimli, and wasmparser

Affects wasm-tools::addr2line

completion default

Enables clap_complete

json-from-wast default

Enables serde, serde_derive, serde_json, and wast

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.

rayon validate
wasm-smith smith
wasm-shrink shrink

Enables wasm-shrink

Dependencies of shrink

wasm-mutate mutate

Enables wasm-mutate

Dependencies of mutate

regex strip

Enables regex

Dependencies of strip

wasm-encoder component demangle strip
wasm-compose compose

Enables wasm-compose

Dependencies of compose

cpp_demangle demangle

Enables cpp_demangle

Dependencies of demangle

rustc-demangle demangle
wit-component component
wit-encoder component
wit-parser component
wasm-metadata metadata

Enables wasm-metadata

Dependencies of metadata

is_executable not wasm shrink
arbitrary smith wit-smith

Enables arbitrary

Dependencies of smith