Cargo Features
[dependencies]
rustpython-common = { version = "0.5.0", default-features = false, features = ["std", "threading", "wasm_js"] }
- default = std
-
The
stdfeature is set by default wheneverrustpython-commonis added withoutsomewhere in the dependency tree.default-features = false - std default threading?
-
Affects
rustpython-common::crt_fd,rustpython-common::fileutils,rustpython-common::os,rustpython-common::windows,refcount::with_deferred_drops,refcount::try_defer_drop,refcount::flush_deferred_drops… - threading = parking_lot, std
-
Affects
rc::PyRc… - wasm_js
-
Enables wasm_js of getrandom ^0.3
getrandom:
Optional backend: wasm_js
This flag enables the wasm_js backend and uses it by default on wasm32 where the target_os is unknown. The getrandom_backend cfg may override this.
WARNING: We strongly recommend against enabling this feature in libraries (except for tests) since it is known to break non-Web WASM builds and further since the usage of
wasm-bindgencauses significant bloat toCargo.lock(on all targets).The only exception to this rule: if your crate already unconditionally depends on
wasm-bindgenorjs-syson "unknown" WASM targets then it's acceptable to enable this feature unconditionally.
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.