Commit Graph

17 Commits

Author SHA1 Message Date
Marius Melzer
f2dd93228a L4Re: Repair build and move to rustc linking
Fixes the builds of rustc and library/std for the L4Re target OS.
A major change was done in linking binaries: The need for the L4Bender
tool was removed and linking parameters are now fully configured in the
rustc target config.
2026-08-06 13:13:18 +02:00
joboet
63ce5798c3 std: improve the documentation of the random feature 2026-07-30 15:26:36 +02:00
Jacob Pratt
5096c1d0f8 Rollup merge of #157539 - joshtriplett:random-source-rename, r=jhpratt
Rename `RandomSource` -> `Rng`, `DefaultRandomSource` -> `SystemRng`

Per naming bikeshed in libs-api. `Rng` is shorter, and already established in the ecosystem. `System` makes it self-documenting that `SystemRng` gets its randomness from the system RNG.

This also makes it short and convenient to write `SystemRng.fill_bytes`, rather than `DefaultRandomSource.fill_bytes`.
2026-06-16 22:10:32 -04:00
Josh Triplett
0e5198863f Rename RandomSource -> Rng, DefaultRandomSource -> SystemRng
Per naming bikeshed in libs-api. `Rng` is shorter, and already
established in the ecosystem. `System` makes it self-documenting that
`SystemRng` gets its randomness from the system RNG.
2026-06-16 12:06:51 -07:00
Asger Hautop Drewsen
a8a5934452 Link to get-random-bytes for WASIp2 and WASIp3 2026-06-07 20:59:26 +02:00
Asger Hautop Drewsen
10cfcd3de0 Fix WASI links 2026-06-04 22:57:33 +02:00
Josh Triplett
f65c5656ff Add doc aliases for DefaultRandomSource, for people looking for randomness
`getrandom` is both a crate for this and the name of the underlying
syscall on various OSes. `getentropy` and `arc4random` are common
library calls on various OSes.
2026-05-31 13:54:35 -07:00
Josh Triplett
9c25035440 Mention how to fill a buffer with random bytes 2026-05-31 13:54:23 -07:00
Daniel Scherzer
78ea9996cd std random.rs: update link to RTEMS docs
The old URL with `master` resulted in a 404 error - use `main` instead.
2026-02-24 07:38:46 -08:00
Josh Triplett
5e203851f7 random: Provide a Distribution<T> trait
This will let people make calls like random(1..=6), and allows for
future expansion to non-uniform distributions, as well as
floating-point.

For now, this is only implemented for `RangeFull`, to get the interface
in place. Subsequent commits will implement it for other range types.
2025-07-11 10:21:34 -07:00
王宇逸
c3051b1f5a Unify cygwin & horizon random impl 2025-03-10 21:23:32 +08:00
Henry Jiang
8ca39104f1 AIX use /dev/urandom for impl 2024-10-22 20:18:11 -04:00
Jan Sommer
e20636a786 Add entropy source for RTEMS 2024-10-18 10:26:59 +02:00
Ralf Jung
1fe049ad57 add link from random() helper fn to extensive DefaultRandomSource docs 2024-09-25 08:25:36 +02:00
joboet
e94dd9b712 random: add tracking issue, address other comments 2024-09-23 10:36:16 +02:00
joboet
b9d47cfa9b std: switch to faster random sources on macOS and most BSDs 2024-09-23 10:36:16 +02:00
joboet
5c1c725724 std: implement the random feature
Implements the ACP https://github.com/rust-lang/libs-team/issues/393.
2024-09-23 10:29:51 +02:00