Skip to content

Eliminate Send conditions on wasm32-unknown-unknown #3377

@heaths

Description

@heaths

This is a bit of an experiment but will impact the public API.

Currently, we have a lot of conditional Send bounds all over our code because the wasm32-unknown-unknown target does not implement Send for Future as required by tokio. We want to maintain WASM/WASI support because Rust is a popular language for WASM.

@yoshuawuyts put me onto https://github.com/bytecodealliance/wstd which provides a (mostly) tokio-compatible executor that supported WASM.

What we should do is:

  1. Add an example async runtime using our APIs for wstd as @cataggar has done here. Not only will that help test the next steps, but helps them watch for breaking changes.
  2. Remove all the #[cfg(target_arch = "wasm32")] and similar conditions.
  3. Add some #[wstd::test] tests (probably in the aforementioned example) to actually test that it works, which we can't do (not without a lot of additional work not funded currently) with wasm32-unknown-unknown.
  4. Remove the WASM support from our async_runtime module.

Metadata

Metadata

Assignees

Labels

Azure.CoreThe azure_core crateClientThis issue points to a problem in the data-plane of the library.blocking-releaseBlocks release

Type

Projects

Status

Not Started

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions