mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-01 11:06:50 +08:00
feat(router): add opt-in mimalloc feature (#141)
Co-authored-by: Sanchith Hegde <22217505+SanchithHegde@users.noreply.github.com>
This commit is contained in:
@ -45,6 +45,7 @@ http = "0.2.8"
|
|||||||
josekit = "0.8.1"
|
josekit = "0.8.1"
|
||||||
literally = "0.1.3"
|
literally = "0.1.3"
|
||||||
maud = { version = "0.24", features = ["actix-web"] }
|
maud = { version = "0.24", features = ["actix-web"] }
|
||||||
|
mimalloc = { version = "0.1", optional = true }
|
||||||
mime = "0.3.16"
|
mime = "0.3.16"
|
||||||
nanoid = "0.4.0"
|
nanoid = "0.4.0"
|
||||||
once_cell = "1.16.0"
|
once_cell = "1.16.0"
|
||||||
|
|||||||
@ -50,6 +50,10 @@ use crate::{
|
|||||||
core::errors::{self, BachResult},
|
core::errors::{self, BachResult},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#[cfg(feature = "mimalloc")]
|
||||||
|
#[global_allocator]
|
||||||
|
static ALLOC: mimalloc::MiMalloc = mimalloc::MiMalloc;
|
||||||
|
|
||||||
/// Header Constants
|
/// Header Constants
|
||||||
pub mod headers {
|
pub mod headers {
|
||||||
pub const X_API_KEY: &str = "X-API-KEY";
|
pub const X_API_KEY: &str = "X-API-KEY";
|
||||||
|
|||||||
Reference in New Issue
Block a user