aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFuwn <[email protected]>2022-03-19 00:58:32 -0700
committerFuwn <[email protected]>2022-03-19 00:58:32 -0700
commit2d1004646f506e7c4358730b4c3de9e8557ea1b5 (patch)
tree6f841eb2b9e79fb7fb380de15a1986efcfd5b4e2
parentMerge branch 'main' of https://github.com/senpy-club/api-worker (diff)
downloadapi-worker-2d1004646f506e7c4358730b4c3de9e8557ea1b5.tar.xz
api-worker-2d1004646f506e7c4358730b4c3de9e8557ea1b5.zip
feat(lib): smaller allocator
-rw-r--r--Cargo.toml3
-rw-r--r--src/lib.rs3
2 files changed, 6 insertions, 0 deletions
diff --git a/Cargo.toml b/Cargo.toml
index d87b700..d7c40e7 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -46,6 +46,9 @@ lazy_static = "1.4.0"
# Web
reqwest = { version = "0.11.9", features = ["json"] }
+# Allocator
+wee_alloc = "0.4.5"
+
[build-dependencies]
# Build variables
vergen = "7.0.0"
diff --git a/src/lib.rs b/src/lib.rs
index e5661dc..6f86f33 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -27,6 +27,9 @@
#![deny(clippy::all, clippy::pedantic)] // clippy::nursery
#![recursion_limit = "128"]
+#[global_allocator]
+static ALLOC: wee_alloc::WeeAlloc<'_> = wee_alloc::WeeAlloc::INIT;
+
mod constants;
mod routes;
mod structures;