Browse Source

mimalloc usage

pull/141/head
ssrlive 2 years ago
parent
commit
1dd6746bbc
  1. 1
      Cargo.toml
  2. 4
      src/lib.rs

1
Cargo.toml

@ -27,6 +27,7 @@ hickory-proto = "0.24"
httparse = "1"
ipstack = { version = "0.1" }
log = { version = "0.4", features = ["std"] }
mimalloc = { version = "0.1", default-features = false, optional = true }
percent-encoding = "2"
socks5-impl = { version = "0.5" }
thiserror = "1"

4
src/lib.rs

@ -30,6 +30,10 @@ pub use {
traffic_status::{tun2proxy_set_traffic_status_callback, TrafficStatus},
};
#[cfg(feature = "mimalloc")]
#[global_allocator]
static ALLOC: mimalloc::MiMalloc = mimalloc::MiMalloc;
#[cfg(any(target_os = "windows", target_os = "macos", target_os = "linux"))]
pub use desktop_api::desktop_run_async;

Loading…
Cancel
Save