Files
nixpkgs/pkgs/development/python-modules/granian/no-alloc.patch

51 lines
1.5 KiB
Diff

diff --git a/Cargo.toml b/Cargo.toml
index 4e6676f..1657d61 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -40,7 +40,6 @@ hyper = { version = "=1.6", features = ["http1", "http2", "server"] }
hyper-util = { version = "=0.1", features = ["server-auto", "tokio"] }
itertools = "0.14"
log = "0.4"
-mimalloc = { version = "0.1.43", default-features = false, features = ["local_dynamic_tls"], optional = true }
mime_guess = "=2.0"
pem = "=3.0"
percent-encoding = "=2.3"
@@ -56,15 +55,9 @@ tokio-stream = "0.1"
tokio-tungstenite = "=0.26"
tokio-util = { version = "0.7", features = ["codec", "rt"] }
-[target.'cfg(not(any(target_env = "musl", target_os = "freebsd", target_os = "openbsd", target_os = "windows")))'.dependencies]
-tikv-jemallocator = { version = "0.6.0", default-features = false, features = ["disable_initial_exec_tls"] }
-
[build-dependencies]
pyo3-build-config = "=0.25"
-[features]
-mimalloc = ["dep:mimalloc"]
-
[profile.release]
codegen-units = 1
debug = false
diff --git a/src/lib.rs b/src/lib.rs
index 9172842..6c41005 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1,17 +1,3 @@
-#[cfg(not(any(
- target_env = "musl",
- target_os = "freebsd",
- target_os = "openbsd",
- target_os = "windows",
- feature = "mimalloc"
-)))]
-#[global_allocator]
-static GLOBAL: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc;
-
-#[cfg(feature = "mimalloc")]
-#[global_allocator]
-static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;
-
use pyo3::prelude::*;
use std::sync::OnceLock;