2019-08-24 15:12:21 +00:00
|
|
|
GO_VERSION=1.12.9
|
|
|
|
TINYGO_VERSION=0.7.1
|
2018-09-17 14:41:02 +00:00
|
|
|
|
2019-08-24 15:12:21 +00:00
|
|
|
default: build_golang
|
2018-09-17 14:41:02 +00:00
|
|
|
|
2019-08-24 15:12:21 +00:00
|
|
|
build_golang:
|
|
|
|
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
|
2018-09-18 16:22:10 +00:00
|
|
|
|
2019-08-24 15:12:21 +00:00
|
|
|
build_tinygo:
|
|
|
|
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
|