Decorator module for creating native functions callable from haru
extern crate haru;
use Vm;
use Value;
The macro should generate a function with the signature:
pub extern "C"
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) {
...
}