Use mimalloc for musl builds

This commit is contained in:
Félix Saparelli 2021-10-15 14:27:32 +13:00
parent 948388b019
commit b780345e8b
2 changed files with 7 additions and 0 deletions

View File

@ -49,6 +49,9 @@ features = [ # TODO: test which of these are actually needed
"time",
]
[target.'cfg(target_env = "musl")'.dependencies]
mimalloc = "0.1.26"
[build-dependencies]
embed-resource = "1.6.1"

View File

@ -18,6 +18,10 @@ use watchexec::{
mod args;
mod config;
#[cfg(target_env = "musl")]
#[global_allocator]
static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;
#[tokio::main]
async fn main() -> Result<()> {
#[cfg(feature = "dev-console")]