Macro include_configs

Source
include_configs!() { /* proc-macro */ }
Expand description

Includes a TOML format config file and expands it into Rust code.

There a three ways to specify the path to the config file, either through the path itself or through an environment variable.

include_configs!("path/to/config.toml");
// or specify the config file path via an environment variable
include_configs!(path_env = "AX_CONFIG_PATH");
// or with a fallback path if the environment variable is not set
include_configs!(path_env = "AX_CONFIG_PATH", fallback = "path/to/defconfig.toml");

See the crate-level documentation for more details.