Cargo Features
[dependencies]
whoami = { version = "2.0.0-pre.0", default-features = false, features = ["web"] }
- default = web
-
The
web
feature is set by default wheneverwhoami
is added without
somewhere in the dependency tree.default-features = false - web default = web-sys
-
Enabling this feature indicates that the wasm32-unknown-unknown target should be assumed to be in a web environment where it can call DOM APIs.
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.