fix(napi): compile issue without compat mode
This commit is contained in:
parent
fa0fe87448
commit
87d1821e73
2 changed files with 6 additions and 3 deletions
|
@ -88,8 +88,11 @@ unsafe impl<K, V> Sync for PersistedSingleThreadHashMap<K, V> {}
|
||||||
lazy_static! {
|
lazy_static! {
|
||||||
static ref MODULE_REGISTER_CALLBACK: ModuleRegisterCallback = Default::default();
|
static ref MODULE_REGISTER_CALLBACK: ModuleRegisterCallback = Default::default();
|
||||||
static ref MODULE_CLASS_PROPERTIES: ModuleClassProperty = Default::default();
|
static ref MODULE_CLASS_PROPERTIES: ModuleClassProperty = Default::default();
|
||||||
// compatibility for #[module_exports]
|
}
|
||||||
|
|
||||||
#[cfg(feature = "compat-mode")]
|
#[cfg(feature = "compat-mode")]
|
||||||
|
// compatibility for #[module_exports]
|
||||||
|
lazy_static! {
|
||||||
static ref MODULE_EXPORTS: PersistedSingleThreadVec<ModuleExportsCallback> = Default::default();
|
static ref MODULE_EXPORTS: PersistedSingleThreadVec<ModuleExportsCallback> = Default::default();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ crate-type = ["cdylib"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
futures = "0.3"
|
futures = "0.3"
|
||||||
napi = {path = "../../crates/napi", features = ["full"]}
|
napi = {path = "../../crates/napi", default-features = false, features = ["napi8", "tokio_rt", "serde-json", "async", "experimental", "latin1"]}
|
||||||
napi-derive = {path = "../../crates/macro", features = ["type-def"]}
|
napi-derive = {path = "../../crates/macro", features = ["type-def"]}
|
||||||
serde = "1"
|
serde = "1"
|
||||||
serde_derive = "1"
|
serde_derive = "1"
|
||||||
|
|
Loading…
Reference in a new issue