Macro neon::register_module [] [src]

macro_rules! register_module {
    ($module:ident, $init:block) => { ... };
}

Register the current crate as a Node module, providing startup logic for initializing the module object at runtime.

Example:

register_module!(m, {
    m.export("foo", foo)?;
    m.export("bar", bar)?;
    m.export("baz", baz)?;
    Ok(())
});