chore: rename napi-derive to napi-rs-derive
This commit is contained in:
parent
b720271009
commit
67ac49a7d7
6 changed files with 10 additions and 7 deletions
|
@ -9,7 +9,7 @@ crate-type = ["cdylib"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
napi-rs = { path = "../napi" }
|
napi-rs = { path = "../napi" }
|
||||||
napi-derive = { path = "../napi-derive" }
|
napi-rs-derive = { path = "../napi-derive" }
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
napi-build = { path = "../build" }
|
napi-build = { path = "../build" }
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate napi_rs as napi;
|
extern crate napi_rs as napi;
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate napi_derive;
|
extern crate napi_rs_derive;
|
||||||
|
|
||||||
use napi::{Any, CallContext, Env, Error, Number, Object, Result, Status, Value};
|
use napi::{Any, CallContext, Env, Error, Number, Object, Result, Status, Value};
|
||||||
use std::convert::TryInto;
|
use std::convert::TryInto;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
[package]
|
[package]
|
||||||
name = "napi-derive"
|
name = "napi-rs-derive"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
authors = ["LongYinan <lynweklm@gmail.com>"]
|
authors = ["LongYinan <lynweklm@gmail.com>"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
|
|
|
@ -3,8 +3,10 @@
|
||||||
## js_function
|
## js_function
|
||||||
|
|
||||||
```rust
|
```rust
|
||||||
|
#[macro_use]
|
||||||
|
extern crate napi_rs_derive;
|
||||||
|
|
||||||
use napi_rs::{Result, Value, CallContext, Number};
|
use napi_rs::{Result, Value, CallContext, Number};
|
||||||
use napi_derive::js_function;
|
|
||||||
use std::convert::TryInto;
|
use std::convert::TryInto;
|
||||||
|
|
||||||
#[js_function]
|
#[js_function]
|
||||||
|
|
|
@ -9,8 +9,8 @@ crate-type = ["cdylib"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
futures = "0.3"
|
futures = "0.3"
|
||||||
napi-rs = {path = "../napi"}
|
napi-rs = { path = "../napi" }
|
||||||
napi-derive = {path = "../napi-derive"}
|
napi-rs-derive = { path = "../napi-derive" }
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
napi-build = { path = "../build" }
|
napi-build = { path = "../build" }
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate napi_rs as napi;
|
extern crate napi_rs as napi;
|
||||||
|
#[macro_use]
|
||||||
|
extern crate napi_rs_derive;
|
||||||
|
|
||||||
extern crate futures;
|
extern crate futures;
|
||||||
|
|
||||||
use napi::{Any, Env, Error, Object, Result, Status, Value, CallContext};
|
use napi::{Any, Env, Error, Object, Result, Status, Value, CallContext};
|
||||||
use napi_derive::js_function;
|
|
||||||
|
|
||||||
register_module!(test_module, init);
|
register_module!(test_module, init);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue