haru-decorator 0.2.3

decorator library for haru

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) {
...
}