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

desub compile to wasm #87

Open
gilescope opened this issue May 26, 2022 · 4 comments
Open

desub compile to wasm #87

gilescope opened this issue May 26, 2022 · 4 comments

Comments

@gilescope
Copy link

Would be cool to be able to use this in web contexts. I think I can get away with not needing subxt on the web but I definitely need desub capabilities.

@jsdw
Copy link
Collaborator

jsdw commented May 26, 2022

I've been working on porting over the dynamic-encode-and-decode-into-Value bits into a new crate, https://github.com/paritytech/scale-value, which has plans to be used in subxt for such decoding (and hopefully cargo-contract). I'm not sure what your exact needs are but perhaps you'd find that useful?

As quite a small crate, it should already support wasm, but there is an issue I raised to add CI to ensure that that is the case going forwards.

@gilescope
Copy link
Author

Actually it looks like desub-current compiles to wasm, it's just desub-legacy that does not (and the top level desub crate because it pulls both in).

@gilescope
Copy link
Author

Also having a look at https://github.com/virto-network/sube for fetching data using the browser.

@jsdw
Copy link
Collaborator

jsdw commented Jun 14, 2022

Actually it looks like desub-current compiles to wasm, it's just desub-legacy that does not (and the top level desub crate because it pulls both in).

That isn't surprising to me offhand! I'd def look towards scale-value where possible, but if you want to decode older blocks in the browser then you may indeed have to look elsewhere at the mo!

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