Cargo Features
[dependencies]
rand_distr = { version = "0.5.0-beta.2", default-features = false, features = ["std", "alloc", "std_math", "serde"] }
- 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
-
Use std's floating-point arithmetic instead of libm. Note that any other crate depending on
num-traits
'sstd
feature (default-enabled) will have the same effect.Enables std of num-traits
- serde
-
Enables serde and serde_with, serde of rand