Cargo Features
[dependencies]
wasm-bindgen = { version = "0.2.99", default-features = false, features = ["std", "enable-interning", "serde-serialize", "spans", "strict-macro", "gg-alloc", "xxx_debug_only_print_generated_code"] }
- default = spans, std
-
These default features are set whenever
wasm-bindgen
is added without
somewhere in the dependency tree.default-features = false - std default enable-interning? serde-serialize?
-
Enables std of once_cell and wasm-bindgen-macro
once_cell:
Enables
once_cell::sync
module.Affects
wasm-bindgen::JsStatic
,wasm-bindgen::JsThreadLocal.__inner
… - enable-interning = std
- serde-serialize = serde, serde_json, std
- spans default
-
Enables spans of wasm-bindgen-macro
- strict-macro
-
Whether or not the
#[wasm_bindgen]
macro is strict and generates an error on all unused attributesEnables strict-macro of wasm-bindgen-macro
- gg-alloc
-
Enables gg-alloc as system allocator when using wasm-bindgen-test to check that large pointers are handled correctly
- xxx_debug_only_print_generated_code
-
This is only for debugging wasm-bindgen! No stability guarantees, so enable this at your own peril!
Enables xxx_debug_only_print_generated_code of wasm-bindgen-macro
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.