-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
switch to official go (master branch) wasmexport
- Loading branch information
Showing
8 changed files
with
30 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
gopath | ||
.gitcookies | ||
.idea | ||
.vscode/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,21 @@ | ||
.PHONY: test checks build | ||
|
||
export GOOS=wasip1 | ||
export GOARCH=wasm | ||
default: test checks build gotip | ||
|
||
default: test checks build | ||
gopath: | ||
mkdir $(CURDIR)/gopath | ||
|
||
test: | ||
go test -v -cover ./... | ||
gopath/bin/gotip: gopath | ||
GOPATH=$(CURDIR)/gopath go install golang.org/dl/gotip@latest | ||
|
||
build: | ||
@go build -o plugin.wasm ./demo.go | ||
gotip: gopath/bin/gotip | ||
$(CURDIR)/gopath/bin/gotip download | ||
|
||
test: gotip | ||
GOOS=wasip1 GOARCH=wasm $(CURDIR)/gopath/bin/gotip test -v -cover ./... | ||
|
||
build: gotip | ||
GOOS=wasip1 GOARCH=wasm CGO_ENABLED=0 $(CURDIR)/gopath/bin/gotip build -buildmode=c-shared -trimpath -o plugin.wasm ./demo.go | ||
|
||
checks: | ||
golangci-lint run | ||
GOOS=wasip1 GOARCH=wasm golangci-lint run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters