Skip to content

WASM Support #882

@kantorcodes

Description

@kantorcodes

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 tonic as a dependency and find another alternative to build the proto files.
  • Add unit tests in a WASM environment

Alternatives

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions