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

[question] golang client that also compiles to wasm ? #557

Closed
gedw99 opened this issue Sep 1, 2022 · 3 comments
Closed

[question] golang client that also compiles to wasm ? #557

gedw99 opened this issue Sep 1, 2022 · 3 comments

Comments

@gedw99
Copy link

gedw99 commented Sep 1, 2022

Ask your question. Please provide as many details as possible – you will get the answer much faster then!

I am needing a golang client that works as wasm and non wasm.

The current go sdk does not support wasm .

...

"Show us an example of what you mean!". An example can be useful, otherwise we're left guessing!

Example would be supporting SSE or websockets in the go sdk via build tags.
...

@FZambia
Copy link
Member

FZambia commented Sep 3, 2022

Hello @gedw99 ! Yep, current Go SDK does not work in wasm env. Would be awesome to have it of course, though no understanding about required effort at the moment. I opened an issue in centrifuge-go: centrifugal/centrifuge-go#67, will be interesting to try, but can't give any promises or ETAs for it unfortunately.

@FZambia
Copy link
Member

FZambia commented Sep 4, 2022

I did some research in centrifugal/centrifuge-go#68 - I made it work and functional. More details in PR description. I am a bit skeptical at this point since wasm binary for a simple example is 12 MB, not sure anyone wants to put file of this size to the frontend app. That pr also describes experiments with tinygo - there are some limitations which prevent centrifuge-go to be used with it.

Closing this issue, lets discuss inside centrifugal/centrifuge-go#67 or centrifugal/centrifuge-go#68

@FZambia FZambia closed this as completed Sep 4, 2022
@gedw99
Copy link
Author

gedw99 commented Dec 14, 2022

you can run nats server and and nats client in the browser.

https://github.com/oderwat/go-nats-app

It's 10 mb as a Service worker. Maybe its fine for some since its a service worker and is cached.

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