napi-rs/bench/src/lib.rs
2020-09-30 15:31:17 +08:00

21 lines
351 B
Rust

#[macro_use]
extern crate napi;
#[macro_use]
extern crate napi_derive;
use napi::{Module, Result};
mod async_compute;
mod noop;
mod plus;
register_module!(bench, init);
fn init(module: &mut Module) -> Result<()> {
module.create_named_method("noop", noop::noop)?;
async_compute::register_js(module)?;
plus::register_js(module)?;
Ok(())
}