Cargo Features

[dependencies]
wasm-bridge = { version = "0.4.0", default-features = false, features = ["wat", "component-model", "async", "error-logging"] }
default = error-logging, wat

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

wat default

Enables wat, wat of wasmtime ^19.0

component-model = js-component-bindgen, wasm-bridge-macros

Enables component-model of wasmtime ^19.0

wasmtime:

Enables in-progress support for the component model. Note that this feature is in-progress, buggy, and incomplete. This is primarily here for internal testing purposes.

Affects js::component, js::direct, sys::component

async = async-trait

Enables async of wasm-bridge-macros and wasmtime ^19.0

wasmtime:

Enables support for "async stores" as well as defining host functions as async fn and calling functions asynchronously.

error-logging default

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.

wasm-bridge-macros async? component-model?
async-trait async?
js-component-bindgen wasm32 component-model?