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

[ws-client] Make wasm compatible #606

Closed
Tracked by #573
athei opened this issue Dec 13, 2021 · 3 comments
Closed
Tracked by #573

[ws-client] Make wasm compatible #606

athei opened this issue Dec 13, 2021 · 3 comments

Comments

@athei
Copy link
Member

athei commented Dec 13, 2021

There is #227 which covers making the http client wasm compatible. However, I think the ws client is much more important because it is the only one allowing subscriptions. It would allow for creating web frontends written in Rust through subxt.

With wasm compatible I mean "runs in a browser". This means making use of web-sys to interact with the browser.

@niklasad1
Copy link
Member

niklasad1 commented Dec 13, 2021

However, I think the ws client is much more important because it is the only one allowing subscription

yeah, indeed.

It's been a while since I looked at the https://github.com/najamelan/ws_stream_wasm but it won't work because the "async/ws" client assumes it assumes that transport can be split into a sender and receiver because we are using them in different tasks (but not sure if it works in WASM anyway)

However, https://github.com/nash-io/nash-ws looks quite promising. I think it should be straight-forward to port over.

@athei
Copy link
Member Author

athei commented Dec 13, 2021

Maybe its worthwhile to use web-sys directly. This crate you mentioned looks kind of abandoned.

@niklasad1
Copy link
Member

Closed by #648

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