summaryrefslogtreecommitdiff
path: root/webapp/Cargo.toml
diff options
context:
space:
mode:
authorKjetil Orbekk <kj@orbekk.com>2022-09-04 20:04:57 -0400
committerKjetil Orbekk <kj@orbekk.com>2022-09-04 20:04:57 -0400
commitb66a92fcc6120781ad5bad06c29f57fa2c919a2c (patch)
tree8d835317ef4b65bef4db9aaf153f5b29a35d0b04 /webapp/Cargo.toml
parentab68d26c6b16f973642d378900f5e6ac2be221b7 (diff)
Add some release size optimizations
Diffstat (limited to 'webapp/Cargo.toml')
-rw-r--r--webapp/Cargo.toml13
1 files changed, 13 insertions, 0 deletions
diff --git a/webapp/Cargo.toml b/webapp/Cargo.toml
index 15a880a..1a52093 100644
--- a/webapp/Cargo.toml
+++ b/webapp/Cargo.toml
@@ -12,7 +12,20 @@ strum = "0.24"
strum_macros = "0.24"
rand = "0.8.4"
getrandom = { version = "0.2.7", features = ["js"] }
+wee_alloc = "0.4.3"
[dev-dependencies]
env_logger = "0.8.4"
dotenv = "0.15"
+
+[profile.release]
+# less code to include into binary
+panic = 'abort'
+# optimization over all codebase ( better optimization, slower build )
+codegen-units = 1
+# optimization for size ( more aggressive )
+opt-level = 'z'
+# optimization for size
+# opt-level = 's'
+# link time optimization using using whole-program analysis
+lto = true