diff --git a/changelog.md b/changelog.md index a3c8486..6c89002 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,13 @@ # Changelog +## 2026-02-26 - 5.3.0 - feat(mailer-bin) +use mimalloc as the global allocator for mailer-bin + +- Add mimalloc dependency to workspace Cargo.toml +- Enable workspace mimalloc in rust/crates/mailer-bin/Cargo.toml +- Register mimalloc as the #[global_allocator] in mailer-bin/src/main.rs +- Update Cargo.lock with new mimalloc and libmimalloc-sys entries + ## 2026-02-26 - 5.2.6 - fix(postinstall) remove legacy postinstall binary installer and packaging entry diff --git a/rust/Cargo.lock b/rust/Cargo.lock index f5eb88f..22bff7f 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -894,6 +894,16 @@ version = "0.2.181" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "459427e2af2b9c839b132acb702a1c654d95e10f8c326bfc2ad11310e458b1c5" +[[package]] +name = "libmimalloc-sys" +version = "0.1.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "667f4fec20f29dfc6bc7357c582d91796c169ad7e2fce709468aefeb2c099870" +dependencies = [ + "cc", + "libc", +] + [[package]] name = "linux-raw-sys" version = "0.11.0" @@ -982,6 +992,7 @@ dependencies = [ "mailer-core", "mailer-security", "mailer-smtp", + "mimalloc", "rustls", "serde", "serde_json", @@ -1063,6 +1074,15 @@ version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" +[[package]] +name = "mimalloc" +version = "0.1.48" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1ee66a4b64c74f4ef288bcbb9192ad9c3feaad75193129ac8509af543894fd8" +dependencies = [ + "libmimalloc-sys", +] + [[package]] name = "miniz_oxide" version = "0.8.9" diff --git a/rust/Cargo.toml b/rust/Cargo.toml index 7734015..3fdebe8 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -32,3 +32,4 @@ clap = { version = "4", features = ["derive"] } sha2 = "0.10" hmac = "0.12" pbkdf2 = { version = "0.12", default-features = false } +mimalloc = "0.1" diff --git a/rust/crates/mailer-bin/Cargo.toml b/rust/crates/mailer-bin/Cargo.toml index 1730684..6dd74cd 100644 --- a/rust/crates/mailer-bin/Cargo.toml +++ b/rust/crates/mailer-bin/Cargo.toml @@ -22,3 +22,4 @@ dashmap.workspace = true base64.workspace = true uuid.workspace = true rustls = { version = "0.23", default-features = false, features = ["ring", "std"] } +mimalloc = { workspace = true } diff --git a/rust/crates/mailer-bin/src/main.rs b/rust/crates/mailer-bin/src/main.rs index 5d1ad70..2008605 100644 --- a/rust/crates/mailer-bin/src/main.rs +++ b/rust/crates/mailer-bin/src/main.rs @@ -5,6 +5,9 @@ //! 2. **Management mode** (`--management`) — JSON-over-stdin/stdout IPC for //! integration with `@push.rocks/smartrust` from TypeScript +#[global_allocator] +static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc; + use clap::{Parser, Subcommand}; use dashmap::DashMap; use serde::{Deserialize, Serialize}; diff --git a/ts/00_commitinfo_data.ts b/ts/00_commitinfo_data.ts index a1474fc..19ff7aa 100644 --- a/ts/00_commitinfo_data.ts +++ b/ts/00_commitinfo_data.ts @@ -3,6 +3,6 @@ */ export const commitinfo = { name: '@push.rocks/smartmta', - version: '5.2.6', + version: '5.3.0', description: 'A high-performance, enterprise-grade Mail Transfer Agent (MTA) built from scratch in TypeScript with Rust acceleration.' }