mirror of
https://github.com/TeamPiped/piped-proxy.git
synced 2024-08-14 23:50:45 +00:00
Use the mimalloc allocator.
This commit is contained in:
parent
f4617959ba
commit
ab1f54bf51
3 changed files with 25 additions and 0 deletions
20
Cargo.lock
generated
20
Cargo.lock
generated
|
@ -857,6 +857,16 @@ version = "0.2.144"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "2b00cc1c228a6782d0f076e7b232802e0c5689d41bb5df366f2a6b6621cfdfe1"
|
checksum = "2b00cc1c228a6782d0f076e7b232802e0c5689d41bb5df366f2a6b6621cfdfe1"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "libmimalloc-sys"
|
||||||
|
version = "0.1.33"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "f4ac0e912c8ef1b735e92369695618dc5b1819f5a7bf3f167301a3ba1cea515e"
|
||||||
|
dependencies = [
|
||||||
|
"cc",
|
||||||
|
"libc",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "libwebp-sys"
|
name = "libwebp-sys"
|
||||||
version = "0.4.2"
|
version = "0.4.2"
|
||||||
|
@ -918,6 +928,15 @@ dependencies = [
|
||||||
"autocfg",
|
"autocfg",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "mimalloc"
|
||||||
|
version = "0.1.37"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "4e2894987a3459f3ffb755608bd82188f8ed00d0ae077f1edea29c068d639d98"
|
||||||
|
dependencies = [
|
||||||
|
"libmimalloc-sys",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "mime"
|
name = "mime"
|
||||||
version = "0.3.17"
|
version = "0.3.17"
|
||||||
|
@ -1083,6 +1102,7 @@ version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"actix-web",
|
"actix-web",
|
||||||
"image",
|
"image",
|
||||||
|
"mimalloc",
|
||||||
"once_cell",
|
"once_cell",
|
||||||
"qstring",
|
"qstring",
|
||||||
"regex",
|
"regex",
|
||||||
|
|
|
@ -8,6 +8,7 @@ version = "0.1.0"
|
||||||
[dependencies]
|
[dependencies]
|
||||||
actix-web = "4.3.1"
|
actix-web = "4.3.1"
|
||||||
image = "0.24.6"
|
image = "0.24.6"
|
||||||
|
mimalloc = "0.1.37"
|
||||||
once_cell = "1.17.1"
|
once_cell = "1.17.1"
|
||||||
qstring = "0.7.2"
|
qstring = "0.7.2"
|
||||||
regex = "1.8.2"
|
regex = "1.8.2"
|
||||||
|
|
|
@ -4,11 +4,15 @@ use std::error::Error;
|
||||||
use actix_web::{App, HttpRequest, HttpResponse, HttpResponseBuilder, HttpServer, web};
|
use actix_web::{App, HttpRequest, HttpResponse, HttpResponseBuilder, HttpServer, web};
|
||||||
use actix_web::http::Method;
|
use actix_web::http::Method;
|
||||||
use image::EncodableLayout;
|
use image::EncodableLayout;
|
||||||
|
use mimalloc::MiMalloc;
|
||||||
use once_cell::sync::Lazy;
|
use once_cell::sync::Lazy;
|
||||||
use qstring::QString;
|
use qstring::QString;
|
||||||
use regex::Regex;
|
use regex::Regex;
|
||||||
use reqwest::{Client, Request, Url};
|
use reqwest::{Client, Request, Url};
|
||||||
|
|
||||||
|
#[global_allocator]
|
||||||
|
static GLOBAL: MiMalloc = MiMalloc;
|
||||||
|
|
||||||
#[actix_web::main]
|
#[actix_web::main]
|
||||||
async fn main() -> std::io::Result<()> {
|
async fn main() -> std::io::Result<()> {
|
||||||
println!("Running server!");
|
println!("Running server!");
|
||||||
|
|
Loading…
Reference in a new issue