Optimising wasm build size, shaves about 10% size off our wasm output. (#186)

This commit is contained in:
Dave Hrycyszyn
2020-04-17 18:21:22 +01:00
committed by GitHub
parent 0bf74a0b36
commit b8edb5c436
2 changed files with 1 additions and 12 deletions
+1
View File
@@ -1,5 +1,6 @@
[profile.release]
panic = "abort"
opt-level = "s"
[workspace]
-12
View File
@@ -38,15 +38,3 @@ wee_alloc = { version = "0.4.2", optional = true }
[dev-dependencies]
wasm-bindgen-test = "0.2"
# This gets ignored right now, and there is a compiler warning generated:
# "warning: profiles for the non root package will be ignored, specify profiles
# at the workspace root"
#
# I'm OK with that for the moment, I don't want to put it in the root Cargo file
# as I'm unclear what effect it'll have and I'm still experimenting with wasm.
# But it's good that we are reminded to do something about it before any
# production release.
[profile.release]
# Tell `rustc` to optimize for small code size.
opt-level = "s"