feat(router): add opt-in mimalloc feature (#141)

Co-authored-by: Sanchith Hegde <22217505+SanchithHegde@users.noreply.github.com>
This commit is contained in:
kos-for-juspay
2022-12-15 09:19:48 +01:00
committed by GitHub
parent a4d64eba7c
commit d36ae26460
2 changed files with 5 additions and 0 deletions

View File

@ -45,6 +45,7 @@ http = "0.2.8"
josekit = "0.8.1"
literally = "0.1.3"
maud = { version = "0.24", features = ["actix-web"] }
mimalloc = { version = "0.1", optional = true }
mime = "0.3.16"
nanoid = "0.4.0"
once_cell = "1.16.0"

View File

@ -50,6 +50,10 @@ use crate::{
core::errors::{self, BachResult},
};
#[cfg(feature = "mimalloc")]
#[global_allocator]
static ALLOC: mimalloc::MiMalloc = mimalloc::MiMalloc;
/// Header Constants
pub mod headers {
pub const X_API_KEY: &str = "X-API-KEY";