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]
|
||||
napi-rs = { path = "../napi" }
|
||||
napi-derive = { path = "../napi-derive" }
|
||||
napi-rs-derive = { path = "../napi-derive" }
|
||||
|
||||
[build-dependencies]
|
||||
napi-build = { path = "../build" }
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#[macro_use]
|
||||
extern crate napi_rs as napi;
|
||||
#[macro_use]
|
||||
extern crate napi_derive;
|
||||
extern crate napi_rs_derive;
|
||||
|
||||
use napi::{Any, CallContext, Env, Error, Number, Object, Result, Status, Value};
|
||||
use std::convert::TryInto;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[package]
|
||||
name = "napi-derive"
|
||||
name = "napi-rs-derive"
|
||||
version = "0.1.0"
|
||||
authors = ["LongYinan <lynweklm@gmail.com>"]
|
||||
edition = "2018"
|
||||
|
|
|
@ -3,8 +3,10 @@
|
|||
## js_function
|
||||
|
||||
```rust
|
||||
#[macro_use]
|
||||
extern crate napi_rs_derive;
|
||||
|
||||
use napi_rs::{Result, Value, CallContext, Number};
|
||||
use napi_derive::js_function;
|
||||
use std::convert::TryInto;
|
||||
|
||||
#[js_function]
|
||||
|
|
|
@ -9,8 +9,8 @@ crate-type = ["cdylib"]
|
|||
|
||||
[dependencies]
|
||||
futures = "0.3"
|
||||
napi-rs = {path = "../napi"}
|
||||
napi-derive = {path = "../napi-derive"}
|
||||
napi-rs = { path = "../napi" }
|
||||
napi-rs-derive = { path = "../napi-derive" }
|
||||
|
||||
[build-dependencies]
|
||||
napi-build = { path = "../build" }
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
#[macro_use]
|
||||
extern crate napi_rs as napi;
|
||||
#[macro_use]
|
||||
extern crate napi_rs_derive;
|
||||
|
||||
extern crate futures;
|
||||
|
||||
use napi::{Any, Env, Error, Object, Result, Status, Value, CallContext};
|
||||
use napi_derive::js_function;
|
||||
|
||||
register_module!(test_module, init);
|
||||
|
||||
|
|
Loading…
Reference in a new issue