-
Notifications
You must be signed in to change notification settings - Fork 169
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
Allow generate_message to be compiled to wasm #1149
Comments
Hey @Tbaut tokio is the underlying async executor/threadpool that drives "async IO" to completion which is required by jsonrpsee for everything except for the wasm client. However with some conditional compilation/feature flags you should be able compile jsonrpsee-client to WASM without tokio, the easiest would be |
I think we just should add a However, be careful here - fetching metadata in CI without checking might be dangerous, and if you are signing it - there is no way to revoke certificate key, so keep it really safe. |
Thanks for the hints. I'd be up to take on the refactoring to have tokio optional, although I will probably need more guidance :) not sure if this is something that could be beneficial for this repo. Regarding the QR generation, my plan for a first step is to not sign them. And then let users compare different independent sources. I forgot whether Signer shows a hash of the metadata upon import. |
have the same error but with anchor-client = "0.25.0". it just dose not want to build. same errors
|
This is a request for guidance as a rust noob.
I would like to use
generate_message
in a website or an extension to help decentralize the work done in the background of metadata portals. My idea was to compilegenerate_message
to wasm. I gave it a try using wasm-pack, and started small with adding wasm-bindgen macro tofetch_info
, and callwasm-pack build --target-web
The build fails with:
the
cargo.lock
tells me Socket2 is a dependancy of tokio. There are a bunch of github issues around this (like here), but no clear solution to me. I tried enabling onlyfeatures = ["sync", "rt"]
as hinted here but the build still fails with the same error.Can you tell me what tokio is needed for, and if you see any way to get around this? I see it's a dep of other deps like
jsonrpsee-*
as well.The text was updated successfully, but these errors were encountered: