From 0fe0910feadf005db179a1a77c3614cdbd19508d Mon Sep 17 00:00:00 2001 From: Ivan Enderlin Date: Mon, 9 May 2022 13:23:16 +0200 Subject: [PATCH] feat(crypto) Reduce Wasm binary size by enabling LTO. --- Cargo.toml | 3 +++ crates/matrix-sdk-crypto/Cargo.toml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 795fafab0..fe375c1e1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,3 +2,6 @@ members = ["benchmarks", "crates/*", "labs/*", "xtask"] # xtask and labs should only be compiled when invoked explicitly default-members = ["benchmarks", "crates/*"] + +[profile.release] +lto = true \ No newline at end of file diff --git a/crates/matrix-sdk-crypto/Cargo.toml b/crates/matrix-sdk-crypto/Cargo.toml index 5e31b4945..d19d67348 100644 --- a/crates/matrix-sdk-crypto/Cargo.toml +++ b/crates/matrix-sdk-crypto/Cargo.toml @@ -74,4 +74,4 @@ tokio = { version = "1.7.0", default-features = false, features = ["macros", "rt [target.'cfg(target_arch = "wasm32")'.dev-dependencies] getrandom = { version = "0.2.6", features = ["js"] } -wasm-bindgen-test = "0.3.24" +wasm-bindgen-test = "0.3.24" \ No newline at end of file