simba icon indicating copy to clipboard operation
simba copied to clipboard

Update `rand` to 0.9

Open im-0 opened this issue 3 months ago • 1 comments

Implementations of Distribution<T> for StandardUniform for all SIMD types containing isize and usize now generate random values using fill_bytes().

Uniform distribution for isize and usize was removed from rand crate. See https://github.com/rust-random/rand/pull/1487 for details.

There is a new UniformUsize distribution, but it is limited to a maximum value under u32::MAX for portability across 32/64bits and for use as array indexes and lengths. Probably it is not suitable if a real uniform distribution is required.

Note that this is a breaking change. nalgebra already updated rand to 0.9 in https://github.com/dimforge/nalgebra/commit/2da148cc7e663897ed5faaa8dd7f3d5ff3048c05.

im-0 avatar Sep 08 '25 07:09 im-0

I renamed new macro to not shadow the old one.

~~Also disabled new functions unless feature = "portable_simd" is enabled.~~ (was a mistake, reverted)

im-0 avatar Sep 20 '25 16:09 im-0