Cargo Features
[dependencies]
cosmwasm-vm = { version = "2.2.0-rc.3", default-features = false, features = ["iterator", "staking", "stargate", "dhat-heap", "cranelift"] }
- default = iterator, staking
-
These default features are set whenever
cosmwasm-vm
is added without
somewhere in the dependency tree.default-features = false - iterator default
-
iterator allows us to iterate over all DB items in a given range this must be enabled to support cosmwasm contracts compiled with the 'iterator' feature optional as some merkle stores (like tries) don't support this given Ethereum 1.0, 2.0, Substrate, and other major projects use Tries we keep this optional, to allow possible future integration (or different Cosmos Backends)
Enables iterator of cosmwasm-std
Affects
backend::Storage.scan
,backend::Storage.next
,backend::Storage.next_value
,backend::Storage.next_key
,imports::do_db_scan
,imports::do_db_next
,imports::do_db_next_key
,imports::do_db_next_value
,memory::maybe_read_region
… - staking default
-
Enables staking of cosmwasm-std
cosmwasm-std:
staking exposes bindings to a required staking moudle in the runtime, via new CosmosMsg types, and new QueryRequest types. This should only be enabled on contracts that require these types, so other contracts can be used on systems with eg. PoA consensus
- stargate
-
this enables all stargate-related functionality, including the ibc entry points
Enables stargate of cosmwasm-std
Affects
calls::call_ibc_channel_open
,calls::call_ibc_channel_connect
,calls::call_ibc_channel_close
,calls::call_ibc_packet_receive
,calls::call_ibc_packet_ack
,calls::call_ibc_packet_timeout
,calls::call_ibc_channel_open_raw
,calls::call_ibc_channel_connect_raw
,calls::call_ibc_channel_close_raw
,calls::call_ibc_packet_receive_raw
,calls::call_ibc_packet_ack_raw
,calls::call_ibc_packet_timeout_raw
,calls::ibc_channel_open
,calls::ibc_channel_connect
,calls::ibc_channel_close
,calls::ibc_packet_receive
… - dhat-heap
-
For heap profiling. Only used in the "heap_profiling" example.
Enables dhat
For heap profiling. Only used in the "heap_profiling" example. This has to be a non-dev dependency because cargo currently does not support optional dev-dependencies.
- cranelift
-
Legacy no-op feature. This is kept for compatibility with older contracts.
Delete this with the next major release.