Skip to content

Commit 62e004f

Browse files
authored
Merge pull request #172 from matrix-org/quenting/shrink-wasm
Further shrink the WASM output by using more aggressive optimizations
2 parents 81a02f6 + 1db7ab9 commit 62e004f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ wasm-opt = ['-Oz', '-g']
4545
# Tell cargo to run `rustc` with `-Oz` - ie, to optimize for size.
4646
# https://doc.rust-lang.org/cargo/reference/profiles.html#opt-level
4747
opt-level = 'z'
48+
# Use a single codegen-unit to enable better optimizations
49+
codegen-units = 1
50+
# Enable fat link time optimization
51+
lto = true
4852

4953
[lib]
5054
crate-type = ["cdylib"]

0 commit comments

Comments
 (0)