diff --git a/napi-derive-example/Cargo.toml b/napi-derive-example/Cargo.toml index 4fcaf238..3191fc82 100644 --- a/napi-derive-example/Cargo.toml +++ b/napi-derive-example/Cargo.toml @@ -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" } diff --git a/napi-derive-example/src/lib.rs b/napi-derive-example/src/lib.rs index dee4b20c..39ca3fac 100644 --- a/napi-derive-example/src/lib.rs +++ b/napi-derive-example/src/lib.rs @@ -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; diff --git a/napi-derive/Cargo.toml b/napi-derive/Cargo.toml index 3d66f600..01c44c83 100644 --- a/napi-derive/Cargo.toml +++ b/napi-derive/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "napi-derive" +name = "napi-rs-derive" version = "0.1.0" authors = ["LongYinan "] edition = "2018" diff --git a/napi-derive/README.md b/napi-derive/README.md index 8c04b96d..f42959e5 100644 --- a/napi-derive/README.md +++ b/napi-derive/README.md @@ -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] diff --git a/test_module/Cargo.toml b/test_module/Cargo.toml index 5e0d2f99..cc669935 100644 --- a/test_module/Cargo.toml +++ b/test_module/Cargo.toml @@ -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" } diff --git a/test_module/src/lib.rs b/test_module/src/lib.rs index 6cc7ca94..949625cd 100644 --- a/test_module/src/lib.rs +++ b/test_module/src/lib.rs @@ -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);