aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/compile-php-to-wasm.sh
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2024-07-09 08:27:57 +0900
committernsfisis <nsfisis@gmail.com>2024-07-09 08:27:57 +0900
commit925f7f4a11341fb950f4f6cd6390187b780ba419 (patch)
tree78d1e1717234675da5e9ce36b6d3408cef586085 /tools/compile-php-to-wasm.sh
parent61d6fdffb161c8b4130eb4982f021fbc0c77c445 (diff)
downloadphp-waddiwasi-925f7f4a11341fb950f4f6cd6390187b780ba419.tar.gz
php-waddiwasi-925f7f4a11341fb950f4f6cd6390187b780ba419.tar.zst
php-waddiwasi-925f7f4a11341fb950f4f6cd6390187b780ba419.zip
feat: add examples/compile-php-to-wasm
Diffstat (limited to 'tools/compile-php-to-wasm.sh')
-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..19d7499
--- /dev/null
+++ b/tools/compile-php-to-wasm.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+set -eux
+
+cd examples/compile-php-to-wasm
+docker build -t nsfisis-waddiwasi-php-wasm .
+docker create --name nsfisis-waddiwasi-php-wasm-tmp-container nsfisis-waddiwasi-php-wasm
+docker cp nsfisis-waddiwasi-php-wasm-tmp-container:/src/php-wasm.js .
+docker cp nsfisis-waddiwasi-php-wasm-tmp-container:/src/php-wasm.wasm .
+docker rm nsfisis-waddiwasi-php-wasm-tmp-container