fix(cli): zig cross armv7 (#1384)
This commit is contained in:
parent
00b09bca6e
commit
2abc94681e
5 changed files with 36 additions and 23 deletions
examples/napi
|
@ -8,6 +8,9 @@ version = "0.1.0"
|
|||
[lib]
|
||||
crate-type = ["cdylib"]
|
||||
|
||||
[features]
|
||||
snmalloc = ["snmalloc-rs"]
|
||||
|
||||
[dependencies]
|
||||
chrono = "0.4"
|
||||
futures = "0.3"
|
||||
|
@ -27,6 +30,11 @@ serde_derive = "1"
|
|||
serde_json = "1"
|
||||
tokio = { version = "1.20.0", features = ["full"] }
|
||||
|
||||
[dependencies.snmalloc-rs]
|
||||
version = "0.3"
|
||||
features = ["build_cc", "local_dynamic_tls"]
|
||||
optional = true
|
||||
|
||||
[build-dependencies]
|
||||
napi-build = { path = "../../crates/build" }
|
||||
|
||||
|
|
|
@ -7,6 +7,10 @@ extern crate napi_derive;
|
|||
#[macro_use]
|
||||
extern crate serde_derive;
|
||||
|
||||
#[cfg(feature = "snmalloc")]
|
||||
#[global_allocator]
|
||||
static ALLOC: snmalloc_rs::SnMalloc = snmalloc_rs::SnMalloc;
|
||||
|
||||
#[napi]
|
||||
/// This is a const
|
||||
pub const DEFAULT_COST: u32 = 12;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue