You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For clarification: crates like rand which cannot assume anything about their target environment would depend on getrandom; the above patch is to replace this dependency.
Crates which can assume JS (web) may use getrandom-js directly.
As I outlined here, we could support
wasm32-unknown-unknown
on web via patchingCargo.toml
:We publish
getrandom-js
with featureall-targets
:wasm32-unknown-unknown
, this will assume a web (JS) target.all-targets
, this willcompile_error!
.all-targets
, this will depend on and usegetrandom
.Users may enable this platform for
getrandom
by patchingCargo.toml
as follows:I think this approach will work, but it's untested. It does not support selection via
cfg
(e.g. env var) however.This does not prevent us also supporting wasm32-u-u on web with the current solution (specifying
getrandom_backend='wasm_js'
).The text was updated successfully, but these errors were encountered: