diff --git a/Cargo.toml b/Cargo.toml
index 66fb5592..3a063dce 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -31,6 +31,7 @@ futures-util = { version = "0.3.21", default-features = false }
 home = "0.5.3"
 log = "0.4.14"
 miette = { version = "5.1.0", features = ["fancy-no-backtrace"] }
+mimalloc = { version = "0.1.29", default-features = false, optional = true }
 once_cell = "1.12.0"
 reqwest = { version = "0.11.11", features = ["rustls-tls", "stream"], default-features = false }
 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]
 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]
 default = []
 mimalloc = ["dep:mimalloc"]
diff --git a/src/main.rs b/src/main.rs
index 882e90f4..75bfc1be 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -25,7 +25,7 @@ use cargo_binstall::{
     *,
 };
 
-#[cfg(all(feature = "mimalloc", any(windows, target_env = "musl")))]
+#[cfg(feature = "mimalloc")]
 #[global_allocator]
 static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;