-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Support WebAssembly / GopherJS #432
Comments
I am not the owner of the project, but I think think a rough outline of your proposal will be required to answer your question. Some things that the outline might include:
|
Thanks for giving me something to think about. I'm not convinced the following is a good idea, but it's currently unclear to me on how we could go about this in a better way.
|
Regarding headers: Is it possible to write cross platform code that Dials a connection? When running in the browser, cookies, user agent and other headers are handled automatically by the browser. When running outside the browser, the application is responsible for supplying all of these headers. Once the connection is hand, it does seem that cross platform code is possible. |
Help wanted: Describe the subset of the package API that will work in the browser and describe how that API will be implemented in the browser. |
I recently helped add WebAssembly support to pion/webrtc and have an open PR to do the same for goleveldb. I would be interested in building WebAssembly support for this package to and we would use it in libp2p/go-ws-transport and 0xProject/0x-mesh (my project at work). Is this still something you're interested in and would you accept a PR? |
After looking more at the API for |
For anyone who needs this feature now, I've implemented it v1.6.3 of my WebSocket library with @albrow's review. |
While I understand that the following implementation exists:
https://github.com/gopherjs/websocket
It'd be nice if I could write code once for my game project that runs natively and on the web.
If I were to make a PR with support for GopherJS / WebAssembly and assuming the code is all good, would it be accepted?
The text was updated successfully, but these errors were encountered: