From 4bd714a67013f16bd26c104fd78436aba994b28f Mon Sep 17 00:00:00 2001 From: rustmailer Date: Tue, 26 May 2026 15:20:59 +0800 Subject: [PATCH] chore: remove custom global allocator --- Cargo.lock | 24 ++---------------------- Cargo.toml | 3 +-- README.md | 1 - crates/admin/Cargo.toml | 3 +-- crates/admin/src/main.rs | 3 --- crates/server/Cargo.toml | 1 - crates/server/src/main.rs | 5 ----- 7 files changed, 4 insertions(+), 36 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4c4f640..e858601 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -301,7 +301,6 @@ dependencies = [ "indicatif", "itertools", "memdb", - "mimalloc", "native_db", "native_model", "serde", @@ -405,7 +404,6 @@ dependencies = [ "email_address", "governor", "http", - "mimalloc", "poem", "poem-derive", "poem-openapi", @@ -1791,9 +1789,9 @@ checksum = "e9025058dae765dee5070ec375f591e2ba14638c63feff74f13805a72e523163" [[package]] name = "http" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3ba2a386d7f85a81f119ad7498ebe444d2e22c2af0b86b069416ace48b3311a" +checksum = "8be7462df143984c4598a256ef469b251d7d7f9e271135073e78fc535414f3d0" dependencies = [ "bytes 1.11.1", "itoa", @@ -2264,15 +2262,6 @@ version = "0.2.185" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "52ff2c0fe9bc6cb6b14a0592c2ff4fa9ceb83eea9db979b0487cd054946a2b8f" -[[package]] -name = "libmimalloc-sys" -version = "0.1.49" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a45a52f43e1c16f667ccfe4dd8c85b7f7c204fd5e3bf46c5b0db9a5c3c0b8e9" -dependencies = [ - "cc", -] - [[package]] name = "linux-raw-sys" version = "0.12.1" @@ -2477,15 +2466,6 @@ dependencies = [ "libc", ] -[[package]] -name = "mimalloc" -version = "0.1.52" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d4139bb28d14ad1facf21d5eb8825051b326e172d216b39f6d31df53cc97862" -dependencies = [ - "libmimalloc-sys", -] - [[package]] name = "mime" version = "0.3.17" diff --git a/Cargo.toml b/Cargo.toml index 20c64da..8184c8f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,7 +18,6 @@ edition = "2021" [workspace.dependencies] chrono = "0.4.44" clap = { version = "4.6.1", features = ["derive", "env"] } -mimalloc = "0.1.52" memdb = { path = "crates/memdb" } itertools = "0.14.0" ring = { version = "0.17.14", features = ["std"] } @@ -39,7 +38,7 @@ reqwest = { version = "0.12.24", default-features = false, features = [ "socks", ] } tokio-socks = "0.5.2" -http = "1.4.0" +http = "1.4.1" regex = "1.12.3" email_address = "0.2.9" futures = "0.3.32" diff --git a/README.md b/README.md index 7fa54d4..a7465b1 100644 --- a/README.md +++ b/README.md @@ -656,7 +656,6 @@ Feel free to open an [Issue](https://github.com/rustmailer/bichon/issues) or joi | **Frontend** | React 18, TypeScript, Vite 6, ShadCN UI, TanStack Router/Query/Table | | **Charts** | Recharts | | **i18n** | i18next (18 languages) | -| **Allocator** | mimalloc | | **Container** | Ubuntu 24.04, Docker | ## License diff --git a/crates/admin/Cargo.toml b/crates/admin/Cargo.toml index 0d8ba94..eddbfb2 100644 --- a/crates/admin/Cargo.toml +++ b/crates/admin/Cargo.toml @@ -17,5 +17,4 @@ serde_json.workspace = true itertools.workspace = true snafu.workspace = true -memdb.workspace = true -mimalloc = "0.1.50" \ No newline at end of file +memdb.workspace = true \ No newline at end of file diff --git a/crates/admin/src/main.rs b/crates/admin/src/main.rs index 10e7752..15655a1 100644 --- a/crates/admin/src/main.rs +++ b/crates/admin/src/main.rs @@ -18,7 +18,6 @@ use console::style; use dialoguer::{theme::ColorfulTheme, Select}; -use mimalloc::MiMalloc; use crate::{migrate::handle_migration, reset::handle_reset_password}; @@ -26,8 +25,6 @@ pub mod meta; pub mod migrate; pub mod reset; -#[global_allocator] -static GLOBAL: MiMalloc = MiMalloc; fn main() { run_interactive(); diff --git a/crates/server/Cargo.toml b/crates/server/Cargo.toml index 0e814f6..26d6eef 100644 --- a/crates/server/Cargo.toml +++ b/crates/server/Cargo.toml @@ -33,7 +33,6 @@ tracing.workspace = true tokio.workspace = true http.workspace = true urlencoding.workspace = true -mimalloc.workspace = true [dev-dependencies] poem = { version = "3.1.12", features = ["test"] } diff --git a/crates/server/src/main.rs b/crates/server/src/main.rs index e3802de..3cfd511 100644 --- a/crates/server/src/main.rs +++ b/crates/server/src/main.rs @@ -16,12 +16,7 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . - use bichon_core::error::BichonResult; -use mimalloc::MiMalloc; - -#[global_allocator] -static GLOBAL: MiMalloc = MiMalloc; #[tokio::main] async fn main() -> BichonResult<()> {