Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compile to WebAssembly #625

Open
VitaliiShpital opened this issue Feb 14, 2021 · 1 comment
Open

compile to WebAssembly #625

VitaliiShpital opened this issue Feb 14, 2021 · 1 comment

Comments

@VitaliiShpital
Copy link

Hello guys!

I'm using
macOS Big Sur 11.2.1
go version go1.14.4 darwin/amd64

I'm trying to compile my test app (which uses Serf) to WebAssembly with this command
GOOS=js GOARCH=wasm go build -o membership.wasm

I always get these errors
`

github.com/hashicorp/go-sockaddr

../../../go/pkg/mod/github.com/hashicorp/go-sockaddr@v1.0.2/ifaddrs.go:116:13: undefined: NewRouteInfo
../../../go/pkg/mod/github.com/hashicorp/go-sockaddr@v1.0.2/ifaddrs.go:276:13: undefined: NewRouteInfo
../../../go/pkg/mod/github.com/hashicorp/go-sockaddr@v1.0.2/route_info.go:14:10: undefined: routeInfo

github.com/armon/go-metrics

../../../go/pkg/mod/github.com/armon/go-metrics@v0.3.6/const_unix.go:11:18: undefined: syscall.SIGUSR1
`

Could you tell me please if it is even possible to build wasm binary using Serf?

Thank you in advance!

@timo-klarshift
Copy link

Doesn't web assembly disallows general sockets? I doubt you will be able to open udp transports. But I might be wrong here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants