Update rand and nalgebra with opt-in wasm_js support#384
Open
day01 wants to merge 4 commits into
Open
Conversation
Contributor
Author
|
Previously, both benchmarks almost always measured the fast path returning |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #384 +/- ##
==========================================
+ Coverage 94.39% 94.41% +0.01%
==========================================
Files 59 59
Lines 12982 12990 +8
==========================================
+ Hits 12254 12264 +10
+ Misses 728 726 -2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
Author
|
I don't think so coverage on display is necessary, but if you req that @YeungOnion i will add... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
MOTIVATION
I encountered this while using
statrsin a Leptos application targetingwasm32-unknown-unknown.Seeded sampling should not require a host entropy source, while browser
applications using APIs such as
rand::rng()need an explicit JavaScriptentropy backend.
This PR separates these use cases: the regular
randfeature supports seededRNGs without enabling host entropy, while the new opt-in
wasm_jsfeatureenables JavaScript-backed randomness.
Changes
randfrom 0.9 to 0.10.nalgebrafrom 0.34 to 0.35 to keep itsrandintegration compatible.rand 0.10RngExtAPI.nalgebra/rand-no-stdto avoid implicitly enablingthread_rng.rand/std_rngfor explicitly seeded RNGs without requiringgetrandom.wasm_jsfeature, enabling:rand/thread_rnggetrandom/wasm_jswasm32-unknown-unknownwith seeded RNG supportwasm32-unknown-unknownwithwasm_jswasm32-wasip1nalgebra 0.35.Acknowledgements
Thanks to @RobertJacobsonCDC for the earlier
rand 0.9migration in #331,@qkniep for the work on the
rand 0.10migration in #374