Cargo Features

[dependencies]
wasmi_collections = { version = "0.39.1", default-features = false, features = ["std", "hash-collections", "prefer-btree-collections"] }
default = std

The std feature is set by default whenever wasmi_collections is added without default-features = false somewhere in the dependency tree.

std default

Enables std of string-interner ^0.17

hash-collections

Hash collections usage:

  • Enable hash-collections to make use of hash-based collections in wasmi_collections.
  • Enable prefer-btree-collections to still use btree-based collections even when the hash-collections crate feature is enabled.

Note:

  • Not enabling hash-collections allows wasmi_collections to drop lots of hash-based dependencies and thus decrease compilation times significantly.
  • Btree-based collections can be useful for environments without a random source.

Which collections will be used:

hash-collections prefer-btree-collections usage
       false   |                    false   |      btree
        true   |                    false   |      hash
       false   |                     true   |      btree
        true   |                     true   |      btree

Enables ahash, hashbrown ^0.14, and string-interner ^0.17

Affects wasmi_collections::hash

prefer-btree-collections