#compatibility #random #compat

no-std rand_core_compat

A compatibility layer for different versions of rand_core

2 releases

0.1.1 Mar 5, 2026
0.1.0 Mar 19, 2025

#115 in No standard library

Download history 49/week @ 2025-11-21 44/week @ 2025-11-28 35/week @ 2025-12-05 48/week @ 2025-12-12 47/week @ 2025-12-19 110/week @ 2025-12-26 350/week @ 2026-01-02 317/week @ 2026-01-09 299/week @ 2026-01-16 386/week @ 2026-01-23 380/week @ 2026-01-30 343/week @ 2026-02-06 495/week @ 2026-02-13 616/week @ 2026-02-20 522/week @ 2026-02-27 1505/week @ 2026-03-06

3,241 downloads per month

MIT/Apache

40KB
681 lines

A compatibility layer for rand_core providing adaptation between traits for each version.

Select the rand_core/rand versions you want to have compatibility between using the crate features:

  • rand_core_0_5: rand_core 0.5/rand 0.7.
  • rand_core_0_6: rand_core 0.6/rand 0.8.
  • rand_core_0_9: rand_core 0.9/rand 0.9.
  • rand_core_0_10: rand_core 0.10/rand 0.10.

You then most likely want to wrap your RNG, e.g. of version rand_core 0.6/rand 0.8 in a Rng06 struct. It'll implement the Rng/RngCore traits of all the other versions you selected via features.

Dependencies

~215KB