macro_rules! global {
($name:literal, $fun:expr) => { ... };
}
Expand description
A macro for defining global functions. Usually used in conjunction with the
exports!
macro.
§Example
use red4ext_rs::{global, GlobalInvocable, GlobalMetadata};
fn my_global() -> GlobalMetadata {
global!(c"Adder", adder)
}
fn adder(a: i32, b: i32) -> i32 {
a + b
}