Skip to content

Commit

Permalink
Add wasm verification test
Browse files Browse the repository at this point in the history
  • Loading branch information
mikelsr committed Aug 5, 2023
1 parent 82b507b commit 6cb379a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ifeq ($(origin GOPATH), undefined)
GOPATH := $(HOME)/go
endif

all: capnp
all: capnp test


capnp: capnp-raft
Expand All @@ -14,3 +14,10 @@ capnp: capnp-raft
capnp-raft:
@mkdir -p proto/api
@capnp compile -I$(GOPATH)/src/capnproto.org/go/capnp/v3/std -ogo:proto/api --src-prefix=proto proto/raft.capnp

test: test-wasm

# Test that everything can be compiled to wasm
test-wasm:
@env GOOS=wasip1 GOARCH=wasm gotip build -o ./test/wasm/test.wasm ./test/wasm
@rm ./test/wasm/test.wasm
7 changes: 7 additions & 0 deletions test/wasm/wasm.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package main

import "github.com/mikelsr/raft-capnp/raft"

func main() {
_ = raft.Node{}
}

0 comments on commit 6cb379a

Please sign in to comment.