mirror of
https://github.com/encounter/nod-rs.git
synced 2025-12-13 15:16:21 +00:00
Use mimalloc when targeting musl
Also removes the armv7 linux build. If you used it, let me know!
This commit is contained in:
@@ -43,6 +43,9 @@ xxhash-rust = { version = "0.8", features = ["xxh64"] }
|
||||
zerocopy = { version = "0.7", features = ["alloc", "derive"] }
|
||||
zstd = "0.13"
|
||||
|
||||
[target.'cfg(target_env = "musl")'.dependencies]
|
||||
mimalloc = "0.1"
|
||||
|
||||
[build-dependencies]
|
||||
hex = { version = "0.4", features = ["serde"] }
|
||||
quick-xml = { version = "0.36", features = ["serialize"] }
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
mod argp_version;
|
||||
|
||||
// musl's allocator is very slow, so use mimalloc when targeting musl.
|
||||
// Otherwise, use the system allocator to avoid extra code size.
|
||||
#[cfg(target_env = "musl")]
|
||||
#[global_allocator]
|
||||
static ALLOC: mimalloc::MiMalloc = mimalloc::MiMalloc;
|
||||
|
||||
use std::{env, error::Error, ffi::OsStr, fmt, path::PathBuf, str::FromStr};
|
||||
|
||||
use argp::{FromArgValue, FromArgs};
|
||||
|
||||
Reference in New Issue
Block a user