about summary refs log tree commit diff
path: root/compiler/rustc_const_eval/src
diff options
context:
space:
mode:
authorKleis Auke Wolthuizen <github@kleisauke.nl>2023-01-18 10:20:27 +0100
committerKleis Auke Wolthuizen <github@kleisauke.nl>2023-03-14 12:39:41 +0100
commite3036613d1151ce64ae32839a785a8b972495e3e (patch)
tree5b51fc0553b6a8cdc1a536767f5988b81f184793 /compiler/rustc_const_eval/src
parent0058748944abb3282aba0e0a74823c6411703565 (diff)
downloadrust-e3036613d1151ce64ae32839a785a8b972495e3e.tar.gz
rust-e3036613d1151ce64ae32839a785a8b972495e3e.zip
Use getentropy() instead of /dev/urandom on Emscripten
`/dev/urandom` is usually available on Emscripten, except when using
the special `NODERAWFS` filesystem backend, which replaces all normal
filesystem access with direct Node.js operations.

Since this filesystem backend directly access the filesystem on the
OS, it is not recommended to depend on `/dev/urandom`, especially
when trying to run the Wasm binary on OSes that are not Unix-based.

This can be considered a non-functional change, since Emscripten
implements `/dev/urandom` in the same way as `getentropy()` when not
linking with `-sNODERAWFS`.
Diffstat (limited to 'compiler/rustc_const_eval/src')
0 files changed, 0 insertions, 0 deletions