-
Notifications
You must be signed in to change notification settings - Fork 20
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 WASM #90
Comments
To support WASM, the crate's API will need to become async due to the browser being natively async. AFAICT there is no good way of bridging it to the current (blocking) interface. Is there a known, specific need for a blocking interface from existing users of |
Why would it have to be async? You can WASM bind blocking functions just fine: https://github.com/BoltzExchange/bolt12-wasm/blob/master/src/lib.rs#L28 |
The issue isn't exposing binds for blocking functions. It's about using the browser's |
Yes, everything network related will have to be made async, which I thought was implied by your suggestion to switch from |
async should not be an issue for the dart bindings. |
Regarding
Not sure if this has been merged yet. |
Regarding |
Changing the the websocket server is not an issue at all. |
@danielgranhao could you try to upstream your changes to secp256k1-zkp? I would like to avoid having to maintain a fork where we cherry pick the changes we need |
At Breez, we are interested in supporting WASM in the Nodeless SDK. The SDK depends on
boltz-rust
, which isn't compatible right now due to dependencies on:ureq
to access Boltz APIelectrum-client
for accessing blockchain datatungstenite
for the WebSocket status streamsecp256k1-zkp
We’d like to discuss possible approaches to enable WASM support while keeping the existing functionality intact.
Potential solutions:
reqwest
. It implements WASM support by simply mapping requests to the browser'sfetch
API. We could switch toreqwest
or allow the selection of the http client through features.gloo-net
seems like a good option.Would love to hear your thoughts on these approaches to see if we can proceed with the corresponding contributions.
The text was updated successfully, but these errors were encountered: