Cargo Features
[dependencies]
string-interner = { version = "0.17.0", default-features = false, features = ["std", "serde-1", "inline-more", "backends", "test-allocations"] }
- default = backends, inline-more, serde-1, std
-
These default features are set whenever
string-interner
is added without
somewhere in the dependency tree.default-features = false - std default
-
serde:
Provide impls for common standard library types like Vec<T> and HashMap<K, V>.
Requires a dependency on the Rust standard library. - serde-1 default = serde
-
Enable this if you need
Serde
serialization and deserialization support.Enabled by default.
- inline-more default
-
Use this to mark more public functions of the StringInterner (and hashbrown)
as inline. This significantly increases compile times of the crate but improves upon runtime execution.
Enabled by default.Enables inline-more of hashbrown ^0.14.0
- backends default
-
Enables the backends provided out of the box by this crate.
Disable this if you want to only use your own backend and thus don't have the need for those present backends. Reduces compilation time of this crate.
Enabled by default.Affects
backend::DefaultBackend
,string-interner::DefaultStringInterner
… - test-allocations
-
Enables testing of memory heap allocations.
These tests are disabled by default since they are slow compared to the other unit tests and also are required to run single threaded using
--test-threads 1
asrustc
argument:cargo test --feature test-allocations -- --test-threads 1
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.