diff --git a/spin/Makefile b/spin/Makefile index 94327413..6e1d2ec3 100644 --- a/spin/Makefile +++ b/spin/Makefile @@ -1,4 +1,4 @@ -all: spin.wasm +all: spin.wasm.js clean: src/spin.c rm -f build/* @@ -10,4 +10,7 @@ build/spin.o: build/spin.ll llc -march=wasm32 -filetype=obj build/spin.ll -o build/spin.o spin.wasm: build/spin.o - wasm-ld -O 4 --features=atomics,mutable-global,bulk-memory --no-check-features --allow-undefined --shared-memory --import-memory --no-entry --export-all -o spin.wasm build/spin.o + wasm-ld -O 4 --features=atomics,mutable-global,bulk-memory --no-check-features --allow-undefined --import-memory --no-entry --export-all -o spin.wasm build/spin.o + +spin.wasm.js: spin.wasm + cat spin.wasm | npx encode-wasm-uint8 > spin.wasm.js