Statics and Consts
You can export static
and const
items, along with associated implementation
fields.
The exported values will be available for reading in the script package namespace.
#[export]
static FOO: usize = 10;
#[export(name "BAZZ")]
const BAR: f32 = 30;
FOO == 10;
BAZZ == 30;
// Or:
crate.FOO == 10;
crate.BAZZ == 30;