-
Notifications
You must be signed in to change notification settings - Fork 295
Description
Bug Title
No response
Crate Name
typespec_client_core
Crate Version
0.4.0+ (rev: ec35896)
Description
First off, thanks for the amazing work for this SDK!
Recently, I have created a small client based on this SDK trying to successfully send a dummy request to Azure. It works fine when running natively. I also hope it can run in the browser, so I successfully to build it (with some tweaking about the getrandom
crate).
PS: I've patched the Cargo.toml to override the dependencies on azure_core
and azure_identity
to revision ec358961712425cb8c688f43685f91c446249011
.
When I run it, I get the following panic:
The issue also occurs in the official release v0.25.0 (thankfully the build doesn't need tweaking). The error is pointing to the same crate, same module, but complaining about thread::spawn
/thead:sleep
is not available in wasm32.
I'd like to know if wasm32-unknown-unknown is offically supported (as I see a lot of cfg
on wasm32
in this repo). I believe using wasm-bindgen
is able to bridge a JS sleep for use in Rust.
Also, since the error is raised from the RetryPolicy, is there a way to allow the user to customize that policy, e.g. don't sleep or something...
Steps to Reproduce
I have a private repo to reproduce this, please let me know if you want to test it out, so I can invite you to my repo.
Checklist
- Follow our Code of Conduct
- Check that there isn't already an issue that request the same bug to avoid creating a duplicate.
- The provided reproduction is a minimal reproducible example of the bug.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status