Cargo Features
[dependencies]
aplang = { version = "0.1.6", default-features = false, features = ["native", "wasm"] }
- native default = stacker
-
"native" feature for non-wasm platforms, enabling native dependencies
dependencies based on features
both - wasm = js-sys, wasm-bindgen
-
YOU SHALL NOT RUN AS A BINARY WITH THE WASM FEATURE!
"wasm" feature, enabling wasm-specific dependencies
cargo build --no-default-features --features wasmEnables js of getrandom, fancy-no-syscall of miette
Affects
aplang::wasm
… - default = native
-
default is empty, so you can explicitly opt-in to "wasm"
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.