From 494ff27b49f0d4360b5445a7c461c84a74ab3b96 Mon Sep 17 00:00:00 2001 From: neon_arch Date: Thu, 5 Sep 2024 21:46:00 +0530 Subject: [PATCH] :recycle: build(deps): refactor cargo dependencies for the app (#603) - remove `smallvec` crate. - add `bincode` crate, - replace `mini-moka` with `moka` crate. - enable `rayon` feature on the `keyword_extraction` & `tcp_nodelay` on the `redis` crates by default. --- Cargo.toml | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index f0481b2..973961b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -27,6 +27,7 @@ tokio = { version = "1.32.0", features = [ ], default-features = false } serde = { version = "1.0.209", default-features = false, features = ["derive"] } serde_json = { version = "1.0.122", default-features = false } +bincode = {version="1.3.3", default-features=false} maud = { version = "0.26.0", default-features = false, features = [ "actix-web", ] } @@ -48,6 +49,7 @@ mlua = { version = "0.9.9", features = [ redis = { version = "0.25.4", features = [ "tokio-comp", "connection-manager", + "tcp_nodelay" ], default-features = false, optional = true } blake3 = { version = "1.5.4", default-features = false } error-stack = { version = "0.4.0", default-features = false, features = [ @@ -55,17 +57,13 @@ error-stack = { version = "0.4.0", default-features = false, features = [ ] } async-trait = { version = "0.1.80", default-features = false } regex = { version = "1.9.4", features = ["perf"], default-features = false } -smallvec = { version = "1.13.1", features = [ - "union", - "serde", -], default-features = false } futures = { version = "0.3.30", default-features = false, features = ["alloc"] } dhat = { version = "0.3.2", optional = true, default-features = false } mimalloc = { version = "0.1.43", default-features = false } async-once-cell = { version = "0.5.3", default-features = false } actix-governor = { version = "0.5.0", default-features = false } -mini-moka = { version = "0.10", optional = true, default-features = false, features = [ - "sync", +moka = { version = "0.12.8", optional = true, default-features = false, features = [ + "future", ] } async-compression = { version = "0.4.12", default-features = false, features = [ "brotli", @@ -82,8 +80,8 @@ base64 = { version = "0.21.5", default-features = false, features = [ cfg-if = { version = "1.0.0", default-features = false, optional = true } keyword_extraction = { version = "1.4.3", default-features = false, features = [ "tf_idf", + "rayon", ] } - stop-words = { version = "0.8.0", default-features = false, features = ["iso"] } thesaurus = { version = "0.5.2", default-features = false, optional = true, features = [ "moby", @@ -104,8 +102,6 @@ lightningcss = { version = "1.0.0-alpha.57", default-features = false, features # Temporary fork with fix minify-js = { git = "https://github.com/RuairidhWilliamson/minify-js", branch = "master", version = "0.6.0", default-features = false} - - [profile.dev] opt-level = 0 debug = true @@ -180,7 +176,7 @@ opt-level = "z" use-synonyms-search = ["thesaurus/static"] default = ["memory-cache"] dhat-heap = ["dep:dhat"] -memory-cache = ["dep:mini-moka"] +memory-cache = ["dep:moka"] redis-cache = ["dep:redis", "dep:base64"] compress-cache-results = ["dep:async-compression", "dep:cfg-if"] encrypt-cache-results = ["dep:chacha20poly1305", "dep:chacha20"]