2020-09-30 15:34:26 +09:00
|
|
|
#[macro_use]
|
|
|
|
extern crate napi_derive;
|
|
|
|
|
2020-11-25 18:42:14 +09:00
|
|
|
use napi::{JsObject, Result};
|
2020-09-30 15:34:26 +09:00
|
|
|
|
|
|
|
mod async_compute;
|
|
|
|
mod noop;
|
|
|
|
mod plus;
|
|
|
|
|
2020-11-25 18:42:14 +09:00
|
|
|
#[module_exports]
|
|
|
|
fn init(mut exports: JsObject) -> Result<()> {
|
|
|
|
exports.create_named_method("noop", noop::noop)?;
|
2020-09-30 15:34:26 +09:00
|
|
|
|
2020-11-25 18:42:14 +09:00
|
|
|
async_compute::register_js(&mut exports)?;
|
|
|
|
plus::register_js(&mut exports)?;
|
2020-09-30 15:34:26 +09:00
|
|
|
|
|
|
|
Ok(())
|
|
|
|
}
|