From 974d2d5f635c873c4bf6e001749c9f2ca8c42714 Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Sat, 26 Sep 2020 05:31:21 +0200 Subject: [PATCH] Display wasm size and enable LTO for release build --- Cargo.toml | 3 +++ build.sh | 2 ++ 2 files changed, 5 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 9ae1d96..9c1c870 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,6 +9,9 @@ edition = "2018" [lib] crate-type = ["cdylib"] +[profile.release] +lto = true + [badges] travis-ci = { repository = "cecton/yewprint", branch = "main" } is-it-maintained-issue-resolution = { repository = "cecton/yewprint" } diff --git a/build.sh b/build.sh index 685956e..19134cd 100755 --- a/build.sh +++ b/build.sh @@ -29,4 +29,6 @@ rc=$? rm -fR public/{.gitignore,package.json,README.md} +echo Wasm size: $(cat public/*.wasm | wc -c) + exit $rc