Expand description
Decorator module for creating native functions callable from haru
extern crate haru;
use haru::vmbindings::vm::Vm;
use haru::vmbindings::value::Value;
#[hana_function()]
fn succ(i: Value::Int) {
Value::Int(i + 1)
}
The macro should generate a function with the signature:
pub extern "C" fn succ(vm: *const Vm, nargs: u16) {
...
}
Attribute Macros§
- Generates a native function callable from haru’s virtual machine.