WASM Support
Problem
At the moment the Rust SDK does not work with WASM, nor do protobufs. It'd be great if we could compile and utilize the SDK in a WASM environment. At a minimum, if protobufs could compile properly, that would enable us to have WASM code that generates proper transaction bytes that a JavaScript client could utilize. This unlocks a number of important use-cases.
I believe the crux of the issue is related to tonic which depends on mio. mio does not appear to compile for WASM, returning errors like these at build time
639 | self.inner.deregister(registry)
| ^^^^^^^^^^ method not found in `IoSource<UdpSocket>`
|
Solution
- Remove
tonicas a dependency and find another alternative to build the proto files. - Add unit tests in a WASM environment
Alternatives
No response
I created a small proof of concept to demonstrate making this work with protobufs, it does seem updating the SDK itself is a bit more complicated.
https://github.com/hashgraph/hedera-sdk-rust/pull/883/files
Hi @gsstoykov I wanted to circle back and understand the timeline for this issue
@kantorcodes I also started looking into this recently and am currently following up on the work that has been done until this point.
bump!
@kantorcodes Sorry for the delay here we had a Questing sprint with high priority. We will be adding this as P1 for the next sprint which starts tomorrow.
8 for initial web assembly parsing.