mirror of
https://github.com/Luzifer/wasm-openssl.git
synced 2024-09-21 00:42:57 +00:00
Cleanup, add tinygo build target
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
ddd0497e32
commit
6f65564958
22
Makefile
22
Makefile
@ -1,10 +1,18 @@
|
|||||||
default: build example/wasm_exec.js
|
GO_VERSION=1.12.9
|
||||||
|
TINYGO_VERSION=0.7.1
|
||||||
|
|
||||||
build:
|
default: build_golang
|
||||||
GOOS=js GOARCH=wasm go build -o example/openssl.wasm main.go
|
|
||||||
|
|
||||||
example/wasm_exec.js:
|
build_golang:
|
||||||
curl -sSfLo example/wasm_exec.js "https://raw.githubusercontent.com/golang/go/go1.11/misc/wasm/wasm_exec.js"
|
curl -fLo ./example/wasm_exec.js "https://raw.githubusercontent.com/golang/go/go${GO_VERSION}/misc/wasm/wasm_exec.js"
|
||||||
|
GOOS=js GOARCH=wasm go build \
|
||||||
|
-o example/openssl.wasm \
|
||||||
|
main.go
|
||||||
|
|
||||||
publish:
|
build_tinygo:
|
||||||
bash golang.sh
|
curl -fLo ./example/wasm_exec.js "https://github.com/tinygo-org/tinygo/blob/v${TINYGO_VERSION}/targets/wasm_exec.js"
|
||||||
|
tinygo build \
|
||||||
|
-o example/openssl.wasm \
|
||||||
|
-target wasm \
|
||||||
|
--no-debug \
|
||||||
|
main.go
|
||||||
|
Loading…
Reference in New Issue
Block a user