️ Configure cargo to Optimize the size of the generated wasm bundle

This commit is contained in:
2024-04-12 14:42:41 +02:00
parent 9951c2fea6
commit 741124e47e
2 changed files with 9 additions and 1 deletions

8
.cargo/config.toml Normal file
View File

@@ -0,0 +1,8 @@
[profile.release]
opt-level = "z"
debug = false
lto = true
codegen-units = 1
panic = "abort"
strip = true
incremental = false

View File

@@ -37,7 +37,7 @@ tracing-web = "0.1.3"
tracing-subscriber = "0.3.18" tracing-subscriber = "0.3.18"
[target.'cfg(target_family = "wasm")'.dependencies] [target.'cfg(target_family = "wasm")'.dependencies]
web-sys = { version = "0.3.69" } web-sys = "0.3.69"
[build-dependencies] [build-dependencies]
regex = "1.10.3" regex = "1.10.3"