smol-rs / fastrand

A simple and fast random number generator
Apache License 2.0
408 stars 35 forks source link

Global rng doesn't work in webassembly #57

Closed dullbananas closed 1 year ago

dullbananas commented 1 year ago

When using the global rng functions (such as fastrand::u8 instead of fastrand::Rng::u8) or Rng::new, it fails because it tries to import "env" at runtime (#34). This should be fixed or mentioned in the docs.

taiki-e commented 1 year ago

Duplicate of https://github.com/smol-rs/fastrand/issues/27