runtime_constant

Attribute Macro runtime_constant 

Source
#[runtime_constant]
Expand description

Attribute used to declare a runtime constant.

Example:

use runmat_macros::runtime_constant;
use runmat_builtins::Value;

#[runtime_constant(name = "pi", value = std::f64::consts::PI)]
const PI_CONSTANT: ();

This registers the constant with the runmat-builtins inventory so the runtime can discover it at start-up.