At present, this package fails to build for WASM:
../../../../go/pkg/mod/golang.stackrox.io/grpc-http1@v0.3.13-0.20240812074332-70d8a3e22717/client/ws_proxy.go:235:3: unknown field HTTPHeader in struct literal of type websocket.DialOptions
../../../../go/pkg/mod/golang.stackrox.io/grpc-http1@v0.3.13-0.20240812074332-70d8a3e22717/client/ws_proxy.go:236:3: unknown field HTTPClient in struct literal of type websocket.DialOptions
../../../../go/pkg/mod/golang.stackrox.io/grpc-http1@v0.3.13-0.20240812074332-70d8a3e22717/client/ws_proxy.go:239:3: unknown field CompressionMode in struct literal of type websocket.DialOptions
This is due to the fact that github.com/coder/websocket exposes different DialOptions structs for WASM than for other targets. There is an issue open that would address at least some of this, but it's old and hasn't gotten much attention.
Unless/until github.com/coder/websocket addresses this issue, is it reasonable for go-grpc-http1 to put the DialOptions use behind a build tag, so that it can compile for web assembly?
I'm happy to submit a pull request if it's likely to be accepted.
At present, this package fails to build for WASM:
This is due to the fact that github.com/coder/websocket exposes different
DialOptionsstructs for WASM than for other targets. There is an issue open that would address at least some of this, but it's old and hasn't gotten much attention.Unless/until
github.com/coder/websocketaddresses this issue, is it reasonable forgo-grpc-http1to put theDialOptionsuse behind a build tag, so that it can compile for web assembly?I'm happy to submit a pull request if it's likely to be accepted.