stuff
This commit is contained in:
@@ -1,2 +1,2 @@
|
||||
[target.wasm32-unknown-unknown]
|
||||
rustflags = ["-C", "linker-plugin-lto=yes", "-C", "inline-threshold=275"]
|
||||
[build]
|
||||
rustflags = ["-C", "linker-plugin-lto=yes", "-C", "inline-threshold=275", "-C", "link-arg=-s"]
|
||||
|
||||
3
build.sh
3
build.sh
@@ -5,14 +5,13 @@ rm -fr tmp pkg | true #delete tmp folder if exists
|
||||
|
||||
#apply optimizations via wasm-opt
|
||||
wasm_opt() {
|
||||
wasm-opt -Os -o pkg/integral_site_bg_2.wasm pkg/integral_site_bg.wasm
|
||||
wasm-opt -Oz -o pkg/integral_site_bg_2.wasm pkg/integral_site_bg.wasm
|
||||
mv pkg/integral_site_bg_2.wasm pkg/integral_site_bg.wasm
|
||||
}
|
||||
|
||||
if test "$1" == "" || test "$1" == "release"; then
|
||||
wasm-pack build --target web --release --no-typescript
|
||||
wasm_opt #apply wasm optimizations
|
||||
|
||||
llvm-strip --strip-all pkg/integral_site_bg.wasm
|
||||
elif test "$1" == "debug"; then
|
||||
wasm-pack build --target web --debug --no-typescript
|
||||
|
||||
Reference in New Issue
Block a user