diff --git a/Cargo.toml b/Cargo.toml index e819b2ec..96926917 100755 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,8 +23,11 @@ pathfinder_simd = { version = "0.5.2", features = ["pf-no-simd"] } futures = "0.3.21" woff2 = "0.3.0" -[target.'cfg(all(not(all(target_os = "linux", target_arch = "aarch64", target_env = "musl")), not(all(target_os = "windows", target_arch = "aarch64")), not(target_arch = "wasm32")))'.dependencies] -mimalloc2-rust = { version = "0.3" } +[target.'cfg(not(any(target_os = "linux", target_family = "wasm")))'.dependencies] +mimalloc = "0.1" + +[target.'cfg(target_os = "linux")'.dependencies] +mimalloc = { version = "0.1", features = ["local_dynamic_tls"] } [target.'cfg(target_arch = "wasm32")'.dependencies] wasm-bindgen = "0.2.87" diff --git a/src/lib.rs b/src/lib.rs index ddfaa09f..c99b440c 100755 --- a/src/lib.rs +++ b/src/lib.rs @@ -34,14 +34,9 @@ mod options; use error::Error; use usvg::NodeExt; -#[cfg(all( - not(target_arch = "wasm32"), - not(debug_assertions), - not(all(target_os = "windows", target_arch = "aarch64")), - not(all(target_os = "linux", target_arch = "aarch64", target_env = "musl")), -))] +#[cfg(all(not(target_family = "wasm"), not(debug_assertions),))] #[global_allocator] -static ALLOC: mimalloc2_rust::GlobalMiMalloc = mimalloc2_rust::GlobalMiMalloc; +static ALLOC: mimalloc::MiMalloc = mimalloc::MiMalloc; #[cfg(target_arch = "wasm32")] #[wasm_bindgen]