fix(cli): zig cross armv7 ()

This commit is contained in:
LongYinan 2022-12-09 18:56:50 +08:00 committed by GitHub
parent 00b09bca6e
commit 2abc94681e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 36 additions and 23 deletions
examples/napi

View file

@ -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" }

View file

@ -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;