Lots of platforms (but by no means all) have CPU intrinsics for random number generation. There are important caveats and variations on these, but they are still useful, especially in embedded case where other entropy sources are problematic. In projects where more comprehensive CSPRNG’s are available, they could/should still at least be used as a mixin entropy source.
I’ve used the rand crate in no_std and it works fine, for the clearly-documented subset of features.
What interests me here is the intersection of the two: so far as I can tell, there isn’t a clear way to get rand to use such an instruction where available – other than perhaps implicitly via OsRng if that happens to use it, and that’s not applicable not in the embedded case.
Is there something that could be put in core to access CPU randomness sources, and used by rand (and probably HashMap too) for benefit where available? It might not be something to recommend for direct consumption by those looking for quick shortcuts, given some of the caveats, but the current alternative seems to be requiring very specific platform knowledge in user code.
(Apologies if there is already such a thing that I missed, it was a while since I went looking).