* napi procedural macro for basic rust/JavaScript types * introduce the `compat-mode` for `napi` and `napi-derive` crates for backward compatible * remove #[inline] and let compiler to decide the inline behavior * cli now can produce the `.d.ts` file for native binding * many tests and example for the new procedural macro Co-authored-by: LongYinan <lynweklm@gmail.com>
11 lines
300 B
Rust
11 lines
300 B
Rust
use napi::{JsObject, Result};
|
|
|
|
mod read_file;
|
|
|
|
use read_file::*;
|
|
|
|
pub fn register_js(exports: &mut JsObject) -> Result<()> {
|
|
exports.create_named_method("testExecuteTokioReadfile", test_execute_tokio_readfile)?;
|
|
exports.create_named_method("testTokioError", error_from_tokio_future)?;
|
|
Ok(())
|
|
}
|