mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-04-22 13:38:43 +00:00
Also use mimalloc on musl
This commit is contained in:
parent
57c6125fc1
commit
e66dc60867
3 changed files with 26 additions and 3 deletions
19
Cargo.lock
generated
19
Cargo.lock
generated
|
@ -146,6 +146,7 @@ dependencies = [
|
|||
"home",
|
||||
"log",
|
||||
"miette",
|
||||
"mimalloc",
|
||||
"once_cell",
|
||||
"reqwest",
|
||||
"scopeguard",
|
||||
|
@ -778,6 +779,15 @@ dependencies = [
|
|||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "libmimalloc-sys"
|
||||
version = "0.1.25"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "11ca136052550448f55df7898c6dbe651c6b574fe38a0d9ea687a9f8088a2e2c"
|
||||
dependencies = [
|
||||
"cc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "libz-ng-sys"
|
||||
version = "1.1.8"
|
||||
|
@ -850,6 +860,15 @@ dependencies = [
|
|||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "mimalloc"
|
||||
version = "0.1.29"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2f64ad83c969af2e732e907564deb0d0ed393cec4af80776f77dd77a1a427698"
|
||||
dependencies = [
|
||||
"libmimalloc-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "mime"
|
||||
version = "0.3.16"
|
||||
|
|
|
@ -68,8 +68,12 @@ zstd = { version = "0.10.0", features = ["bindgen", "zstdmt"], default-features
|
|||
[target.'cfg(any(target_os = "macos", target_os = "windows"))'.dependencies]
|
||||
guess_host_triple = "0.1.3"
|
||||
|
||||
[target.'cfg(windows)'.dependencies]
|
||||
mimalloc = { version = "0.1.29", default-features = false}
|
||||
[target.'cfg(any(windows, target_env = "musl"))'.dependencies]
|
||||
mimalloc = { version = "0.1.29", default-features = false, optional = true }
|
||||
|
||||
[features]
|
||||
default = []
|
||||
mimalloc = ["dep:mimalloc"]
|
||||
|
||||
[dev-dependencies]
|
||||
env_logger = "0.9.0"
|
||||
|
|
|
@ -25,7 +25,7 @@ use cargo_binstall::{
|
|||
*,
|
||||
};
|
||||
|
||||
#[cfg(windows)]
|
||||
#[cfg(all(feature = "mimalloc", any(windows, target_env = "musl")))]
|
||||
#[global_allocator]
|
||||
static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue