Release opt

This commit is contained in:
Dominic Grimm 2023-06-02 18:40:49 +02:00
parent 30167bdd8d
commit ce744bfee8
Signed by: dergrimm
GPG Key ID: B6FFE500AAD54A3A
3 changed files with 34 additions and 1 deletions

21
Cargo.lock generated
View File

@ -929,6 +929,7 @@ dependencies = [
"juniper_actix", "juniper_actix",
"lazy_static", "lazy_static",
"log", "log",
"tikv-jemallocator",
"tokio", "tokio",
"uuid 1.3.3", "uuid 1.3.3",
"uuid-simd", "uuid-simd",
@ -1998,6 +1999,26 @@ dependencies = [
"syn 2.0.18", "syn 2.0.18",
] ]
[[package]]
name = "tikv-jemalloc-sys"
version = "0.5.3+5.3.0-patched"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a678df20055b43e57ef8cddde41cdfda9a3c1a060b67f4c5836dfb1d78543ba8"
dependencies = [
"cc",
"libc",
]
[[package]]
name = "tikv-jemallocator"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "20612db8a13a6c06d57ec83953694185a367e16945f66565e8028d2c0bd76979"
dependencies = [
"libc",
"tikv-jemalloc-sys",
]
[[package]] [[package]]
name = "time" name = "time"
version = "0.1.45" version = "0.1.45"

View File

@ -3,7 +3,10 @@ name = "fiddle"
version = "0.1.0" version = "0.1.0"
edition = "2021" edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [profile.release]
opt-level = 3
lto = true
codegen-units = 1
[dependencies] [dependencies]
actix-cors = "0.6.4" actix-cors = "0.6.4"
@ -28,3 +31,6 @@ log = "0.4.18"
tokio = { version = "1.28.2", features = ["full"] } tokio = { version = "1.28.2", features = ["full"] }
uuid-simd = "0.8.0" uuid-simd = "0.8.0"
uuidv7 = { version = "1.3.2", package = "uuid", features = ["serde"] } uuidv7 = { version = "1.3.2", package = "uuid", features = ["serde"] }
[target.'cfg(not(target_env = "msvc"))'.dependencies]
tikv-jemallocator = "0.5"

View File

@ -5,12 +5,18 @@ use diesel::prelude::*;
use std::fs; use std::fs;
use std::thread; use std::thread;
use std::time::Duration; use std::time::Duration;
#[cfg(not(target_env = "msvc"))]
use tikv_jemallocator::Jemalloc;
use uuidv7::Uuid; use uuidv7::Uuid;
use juniper_actix::graphql_handler; use juniper_actix::graphql_handler;
use fiddle::{api, db, init, prune_job, prune_many, CONFIG}; use fiddle::{api, db, init, prune_job, prune_many, CONFIG};
#[cfg(not(target_env = "msvc"))]
#[global_allocator]
static GLOBAL: Jemalloc = Jemalloc;
fn tamper_prune() -> Result<()> { fn tamper_prune() -> Result<()> {
let db_conn = &mut db::POOL.get()?; let db_conn = &mut db::POOL.get()?;