Cargo Features

[dependencies]
rhai-rand = { version = "0.1.6", default-features = false, features = ["metadata", "float", "array", "decimal", "document-features"] }
default = array, float

Default features: float and array.

metadata

Includes functions metadata: parameter names/types, return type, doc-comments etc.

Enables metadata of rhai

float default

Provides random floating-point number generation.

Affects rand::rand_functions.rand_bool_with_probability, rand::rand_functions.rand_float, rand::rand_functions.rand_float_range

array default

Provides methods for Rhai arrays.

decimal = rust_decimal

Provides random decimal number generation.

Enables decimal of rhai

Affects rand::rand_functions.rand_decimal, rand::rand_functions.rand_decimal_range

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.

rust_decimal decimal?
document-features implicit feature

Enables document-features

document-features:

Extract documentation for the feature flags from comments in Cargo.toml