go-billy
go-billy copied to clipboard
Question: WebAssembly support for go-billy ?
I'm unable to compile my code with go-billy dependencies.
> env GOOS=js GOARCH=wasm go build -v -o main.wasm cmd/addbranch/main/main.go
/home/capsci/go/pkg/mod/github.com/go-git/go-billy/[email protected]/osfs/os_posix.go:8:2: build constraints exclude all Go files in /home/capsci/go/pkg/mod/golang.org/x/[email protected]/unix
I have a fork of go-billy which compiles to wasm and is used in my Git Portal project (commit 56e87cf). Here is the diff with go-git/go-billy
or you cold use my fork directly: https://github.com/go-git/go-billy/compare/master...happybeing:master
Thanks @happybeing
The tag js
enables that: https://github.com/go-git/go-billy/blob/master/osfs/os_posix.go#L1
Please note that one of the CI workflows run tests on wasm.
Hi, with Go v1.21. can we please add support for GOOS=wasip1
?
I added support for GOOS=wasip1 in the pull request https://github.com/go-git/go-billy/pull/36