Cargo Features
[dependencies]
near-sdk = { version = "5.5.0", default-features = false, features = ["expensive-debug", "unstable", "legacy", "abi", "unit-testing", "wee_alloc"] }
- default = wee_alloc
-
The
wee_alloc
feature is set by default whenevernear-sdk
is added without
somewhere in the dependency tree.default-features = false - expensive-debug
- unstable
-
Affects
env::ecrecover
,store::tree_map
… - legacy
-
Affects
near-sdk::collections
… - abi = near-abi, schemars
-
Enables unstable__schema of borsh, abi of near-account-id, near-gas, near-sdk-macros, and near-token
- unit-testing = near-crypto, near-parameters, near-primitives, near-primitives-core, near-vm-runner
-
Affects
env::set_blockchain_interface
,environment::mock
,near-sdk::test_utils
,primitives::MerkleHash
… - __macro-docs
-
Affects
near-sdk::near
…
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.
- near-abi not wasm32 abi?
- near-crypto not wasm32 unit-testing?
-
Enables near-crypto ^0.26
- near-parameters not wasm32 unit-testing?
-
Enables near-parameters ^0.26
- near-primitives not wasm32 unit-testing?
-
Enables near-primitives ^0.26
- near-primitives-core not wasm32 unit-testing?
-
Enables near-primitives-core ^0.26
- near-vm-runner not wasm32 unit-testing?
-
Enables near-vm-runner ^0.26
- schemars not wasm32 abi?
- wee_alloc wasm32 default