build fixes

This commit is contained in:
Simon Gardling
2022-02-24 02:29:19 -05:00
parent 0c95e70533
commit 3c51050054
3 changed files with 4 additions and 4 deletions

View File

@@ -9,7 +9,7 @@ crate-type=["cdylib"]
[profile.release]
debug = 0
codegen-units = 1
opt-level = 3
opt-level = "s" #optimize for size
lto = true
[dependencies]

View File

@@ -1,11 +1,11 @@
#!/bin/bash
set -e #kill script if error occurs
wasm-pack build --target web --release
wasm-pack build --target web --release --no-typescript
rm -fr tmp | true #delete tmp folder if exists
mkdir tmp tmp/pkg
cp -r pkg/integral_site_bg.wasm pkg/integral_site_bg.wasm.d.ts pkg/integral_site.d.ts pkg/integral_site.js tmp/pkg/
cp -r pkg/integral_site_bg.wasm pkg/integral_site.js tmp/pkg/
cp www/index.html www/style.css tmp/
sed -i 's/\.\.\/pkg/\.\/pkg/g' tmp/index.html

View File

@@ -11,6 +11,6 @@ then
cargo install wasm-pack
fi
wasm-pack build --release --target web
wasm-pack build --release --target web --no-typescript
basic-http-server