From 2cbda03deb539500af4d999a9a32db018d7e6fd4 Mon Sep 17 00:00:00 2001 From: G2-Games Date: Fri, 2 Feb 2024 00:35:13 -0600 Subject: [PATCH] Added release profile options to decrease size of compiled library --- Cargo.toml | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 2e359ba..645348f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,6 +18,12 @@ edition = "2021" [lib] crate-type = ["cdylib", "rlib"] +[dependencies] +thiserror = "1.0.56" + +[dev-dependencies] +tokio-test = "0.4.3" + # Wasm deps [target.'cfg(target_family = "wasm")'.dependencies] wasm-bindgen = "0.2.84" @@ -42,16 +48,13 @@ features = [ # Non-wasm deps [target.'cfg(not(target_family = "wasm"))'.dependencies] -nusb = "0.1.5" - -[dev-dependencies] -tokio-test = "0.4.3" +nusb = "0.1.6" [profile.release] -opt-level = "s" - -[dependencies] -thiserror = "1.0.56" +lto = true +strip = true +opt-level = "z" +codegen-units = 1 [package.metadata.wasm-pack.profile.dev.wasm-bindgen] dwarf-debug-info = true