rewrite in go and compile to wasm

This commit is contained in:
2024-10-24 18:07:10 +00:00
parent bc50e3ee4d
commit 547dffd8ee
18 changed files with 810 additions and 468 deletions

17
Makefile Normal file
View File

@@ -0,0 +1,17 @@
.PHONY: build clean test
build: clean
@echo "======================== Building Binary ======================="
GOOS=js GOARCH=wasm CGO_ENABLED=0 tinygo build -no-debug -opt=2 -target=wasm -o dist/wfa.wasm .
clean:
@echo "======================== Cleaning Project ======================"
go clean
rm -f dist/wfa.wasm
test:
@echo "======================== Running Tests ========================="
go test -v -cover -coverpkg=./pkg/ -coverprofile coverage ./test/
@echo "======================= Coverage Report ========================"
go tool cover -func=coverage
@rm -f coverage