6 releases
0.21.0 | Jun 8, 2019 |
---|---|
0.2.3 | Jun 2, 2019 |
0.2.2 | May 30, 2019 |
0.1.0 | May 20, 2019 |
#17 in #decorator
Used in haru
7KB
80 lines
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) {
...
}
Dependencies
~2MB
~48K SLoC