mirror of
https://mirror.suhoan.cn/https://github.com/EasyTier/EasyTier.git
synced 2025-12-16 14:47:25 +08:00
easytier-web and uptime use mimalloc as allocator (#1559)
This commit is contained in:
@@ -19,6 +19,8 @@ use easytier::{
|
||||
utils::{init_logger, setup_panic_handler},
|
||||
};
|
||||
|
||||
use mimalloc::MiMalloc;
|
||||
|
||||
mod client_manager;
|
||||
mod db;
|
||||
mod migrator;
|
||||
@@ -27,6 +29,9 @@ mod restful;
|
||||
#[cfg(feature = "embed")]
|
||||
mod web;
|
||||
|
||||
#[global_allocator]
|
||||
static GLOBAL_MIMALLOC: MiMalloc = MiMalloc;
|
||||
|
||||
rust_i18n::i18n!("locales", fallback = "en");
|
||||
|
||||
#[derive(Parser, Debug)]
|
||||
@@ -161,7 +166,7 @@ async fn get_dual_stack_listener(
|
||||
Ok((v6_listener, v4_listener))
|
||||
}
|
||||
|
||||
#[tokio::main]
|
||||
#[tokio::main(flavor = "multi_thread", worker_threads = 4)]
|
||||
async fn main() {
|
||||
let locale = sys_locale::get_locale().unwrap_or_else(|| String::from("en-US"));
|
||||
rust_i18n::set_locale(&locale);
|
||||
|
||||
Reference in New Issue
Block a user