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
{{ message }}
Repository navigation
getrandom_backend="wasm_js" without wasm_js feature #877
Currently if you want to use getrandom_backend="wasm_js" you also have to enable the wasm_js crate feature.
It seems there is a general desire to phase out the wasm_js feature. I was wondering if it would be possible for getrandom_backend="wasm_js" to be used without enabling the crate feature, just gating things as e.g. any(feature = "wasm_js", cfg(getrandom_backend="wasm_js")).
getrandom_backend="wasm_js" has no effect since v0.3.4 and it's no longer listed as an opt-in backend. In a future release I personally would love to move Web WASM backend out of getrandom proper using EII (ideally, into wasm-bindgen/js-sys), but I can't say that we have a consensus here.
I was wondering if it would be possible for getrandom_backend="wasm_js" to be used without enabling the crate feature
The problem is that we have to add the necessary dependencies. Adding flag-based cfgs to getrandom's Cargo.toml would unconditionally bloat Cargo.lock for all downstream users.
Activity
newpavlov commentedon Nov 6, 2026
getrandom_backend="wasm_js"has no effect since v0.3.4 and it's no longer listed as an opt-in backend. In a future release I personally would love to move Web WASM backend out ofgetrandomproper using EII (ideally, intowasm-bindgen/js-sys), but I can't say that we have a consensus here.The problem is that we have to add the necessary dependencies. Adding flag-based
cfgs togetrandom's Cargo.toml would unconditionally bloat Cargo.lock for all downstream users.