-
Notifications
You must be signed in to change notification settings - Fork 249
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
wasm: aws-config uses fastrand, which needs a feature patch for WASM compatibility #851
Comments
Hey @simbleau, thanks for submitting this issue. We'll add it to our backlog. To whomever picks this one up: It looks like we should consider making the source of randomness configurable, just like we did for the async sleep impl and the time source. |
|
It looks like in the latest code, |
I think you can work around this in the current release of aws-config by setting |
By current release, do you mean 0.55? If so, then that is not correct. I didn't have default features (in the reproduction steps). |
Hmmm. OK, I didn't look into that thoroughly enough. I saw that our integration test for webassembly was depending on aws-config with no default features, and it is currently passing, but that may be a more recent development. Edit: I think I see why: the test is specifically targeting |
This has been fixed in the August 3rd release. |
|
Describe the bug
To be fixed with #59.
Attempting to compile anything using
aws-config
on WASM will fail since it usesfastrand
.See the
Cargo.toml
.fastrand
has a dependency onrand
, andrand
usesgetrandom
.getrandom
needs to be compiled with thejs
feature.Fortunately,
fastrand
has the undocumentedjs
feature flag to fix this for us. We just need to include it for wasm.Expected Behavior
Successful compile.
Current Behavior
Fails to compile.
Reproduction Steps
aws-config = { version = "0.55", default-features = false }
Possible Solution
Here's the fix to the Cargo.toml:
Additional Information/Context
No response
Version
Environment details (OS name and version, etc.)
MacOS Ventura
Logs
No response
The text was updated successfully, but these errors were encountered: