aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rwxr-xr-xtools/compile-php-to-wasm.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/compile-php-to-wasm.sh b/tools/compile-php-to-wasm.sh
new file mode 100755
index 0000000..60806e7
--- /dev/null
+++ b/tools/compile-php-to-wasm.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+set -eux
+
+cd wasm
+docker build -t phperkaigi2025-tokens-php-wasm .
+docker create --name phperkaigi2025-tokens-php-wasm-tmp-container phperkaigi2025-tokens-php-wasm
+docker cp phperkaigi2025-tokens-php-wasm-tmp-container:/src/php-wasm.js ../src/php-wasm-bridge.js
+docker cp phperkaigi2025-tokens-php-wasm-tmp-container:/src/php-wasm.wasm ../public/php-wasm.wasm
+docker rm phperkaigi2025-tokens-php-wasm-tmp-container