mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-04-24 22:30:03 +00:00
Just hide mimalloc behind a feature, available for all platforms
This commit is contained in:
parent
e66dc60867
commit
63afa5b791
2 changed files with 2 additions and 4 deletions
|
@ -31,6 +31,7 @@ futures-util = { version = "0.3.21", default-features = false }
|
||||||
home = "0.5.3"
|
home = "0.5.3"
|
||||||
log = "0.4.14"
|
log = "0.4.14"
|
||||||
miette = { version = "5.1.0", features = ["fancy-no-backtrace"] }
|
miette = { version = "5.1.0", features = ["fancy-no-backtrace"] }
|
||||||
|
mimalloc = { version = "0.1.29", default-features = false, optional = true }
|
||||||
once_cell = "1.12.0"
|
once_cell = "1.12.0"
|
||||||
reqwest = { version = "0.11.11", features = ["rustls-tls", "stream"], default-features = false }
|
reqwest = { version = "0.11.11", features = ["rustls-tls", "stream"], default-features = false }
|
||||||
scopeguard = "1.1.0"
|
scopeguard = "1.1.0"
|
||||||
|
@ -68,9 +69,6 @@ zstd = { version = "0.10.0", features = ["bindgen", "zstdmt"], default-features
|
||||||
[target.'cfg(any(target_os = "macos", target_os = "windows"))'.dependencies]
|
[target.'cfg(any(target_os = "macos", target_os = "windows"))'.dependencies]
|
||||||
guess_host_triple = "0.1.3"
|
guess_host_triple = "0.1.3"
|
||||||
|
|
||||||
[target.'cfg(any(windows, target_env = "musl"))'.dependencies]
|
|
||||||
mimalloc = { version = "0.1.29", default-features = false, optional = true }
|
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = []
|
default = []
|
||||||
mimalloc = ["dep:mimalloc"]
|
mimalloc = ["dep:mimalloc"]
|
||||||
|
|
|
@ -25,7 +25,7 @@ use cargo_binstall::{
|
||||||
*,
|
*,
|
||||||
};
|
};
|
||||||
|
|
||||||
#[cfg(all(feature = "mimalloc", any(windows, target_env = "musl")))]
|
#[cfg(feature = "mimalloc")]
|
||||||
#[global_allocator]
|
#[global_allocator]
|
||||||
static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;
|
static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue