diff --git a/.gitignore b/.gitignore index cf791a3..9b8d437 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ -main.wasm* +openssl.wasm wasm_exec.js diff --git a/Makefile b/Makefile index 4588d21..3552e75 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,10 @@ -default: build wasm_exec.js +default: build example/wasm_exec.js build: - GOOS=js GOARCH=wasm go build -o main.wasm main.go - gzip -c main.wasm > main.wasm.gz + GOOS=js GOARCH=wasm go build -o example/openssl.wasm main.go -wasm_exec.js: - curl -sSfLo wasm_exec.js "https://raw.githubusercontent.com/golang/go/go1.11/misc/wasm/wasm_exec.js" +example/wasm_exec.js: + curl -sSfLo example/wasm_exec.js "https://raw.githubusercontent.com/golang/go/go1.11/misc/wasm/wasm_exec.js" publish: bash golang.sh diff --git a/index.html b/example/index.html similarity index 100% rename from index.html rename to example/index.html diff --git a/index.js b/example/index.js similarity index 76% rename from index.js rename to example/index.js index 69775d6..8e89b60 100644 --- a/index.js +++ b/example/index.js @@ -14,4 +14,4 @@ function opensslLoaded() { } const go = new Go() -WebAssembly.instantiateStreaming(fetch("main.wasm"), go.importObject).then(async obj => await go.run(obj.instance)) +WebAssembly.instantiateStreaming(fetch("openssl.wasm"), go.importObject).then(async obj => await go.run(obj.instance))