summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornatrixaeria <janng@gmx.de>2019-06-11 20:42:09 +0200
committernatrixaeria <janng@gmx.de>2019-06-11 20:42:09 +0200
commitd8b483d39d1051a94e4f5a955dc19a93629ec894 (patch)
treed169cee95d5c45020842424718cd9a885dea1e32
parentb21428c0ea29452e3edc5a11f72fa3e614ea617e (diff)
Create a build script
-rw-r--r--webhogg/wasm/Cargo.toml2
-rwxr-xr-xwebhogg/wasm/build5
2 files changed, 6 insertions, 1 deletions
diff --git a/webhogg/wasm/Cargo.toml b/webhogg/wasm/Cargo.toml
index 79a96f3..b01d7e3 100644
--- a/webhogg/wasm/Cargo.toml
+++ b/webhogg/wasm/Cargo.toml
@@ -1,5 +1,5 @@
[package]
-name = "wasm"
+name = "webhogg-wasm"
version = "0.1.0"
authors = [
"natrixaeria",
diff --git a/webhogg/wasm/build b/webhogg/wasm/build
new file mode 100755
index 0000000..a0c4df1
--- /dev/null
+++ b/webhogg/wasm/build
@@ -0,0 +1,5 @@
+#!/bin/bash
+
+cargo build --target wasm32-unknown-unknown --release
+wasm-bindgen target/wasm32-unknown-unknown/release/webhogg-wasm.wasm --out-dir bin/ --no-typescript --target no-modules --remove-producers-section --remove-name-section
+wasm-opt -Oz bin/*.wasm -o bin/*.wasm