Cargo Features
[dependencies]
rand_distr = { version = "0.5.0-alpha.1", default-features = false, features = ["std", "alloc", "std_math", "serde1", "serde_with"] }
- default = std
-
The
std
feature is set by default wheneverrand_distr
is added without
somewhere in the dependency tree.default-features = false - std default = alloc
-
For inline examples
- alloc std
-
Affects
rand_distr::weighted_alias
,rand_distr::weighted_tree
… - std_math
-
Enables std of num-traits
- serde1 = serde
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.
- serde serde1?
- serde_with implicit feature
-
Enables serde_with
serde_with:
Custom de/serialization functions for Rust's serde