Macro erlang_nif_sys::nif_init[][src]

macro_rules! nif_init {
    ($($rest:tt)*) => { ... };
}

Implement exported module init function needed by the Erlang runtime.

See the module level documentation for usage of nif_init!.

The pre-0.5.5 nif_init! format is deprecated but still supported. An example of this format is ...

This example is not tested
nif_init!(b"my_nif_module\0", Some(load), None, None, None,
    nif!(b"my_nif_fun1\0", 1, my_nif_fun1),
    nif!(b"my_dirty_fun2\0", 1, my_dirty_fun2, ERL_NIF_DIRTY_JOB_CPU_BOUND)
);