summary refs log tree commit diff
path: root/library/std/src/sys/random
AgeCommit message (Collapse)AuthorLines
2025-07-27Remove `[T]::array_chunks(_mut)`Scott McMurray-10/+9
2025-07-13Rollup merge of #143776 - no1wudi:fix, r=tgross35León Orell Valerian Liehr-1/+1
std: move NuttX to use arc4random for random number generation arc4random support in libc merged in https://github.com/rust-lang/libc/pull/4464, so: * Move `target_os = "nuttx"` from unix_legacy to arc4random section * This aligns NuttX with other POSIX-compliant systems that support arc4random * Improves random number generation quality on NuttX by using the system's built-in arc4random implementation instead of legacy fallback methods NuttX supports arc4random_buf which provides better entropy and security compared to the legacy random number generation methods.
2025-07-11std: move NuttX to use arc4random for random number generationHuang Qi-1/+1
* Move `target_os = "nuttx"` from unix_legacy to arc4random section * This aligns NuttX with other POSIX-compliant systems that support arc4random * Improves random number generation quality on NuttX by using the system's built-in arc4random implementation instead of legacy fallback methods NuttX supports arc4random_buf which provides better entropy and security compared to the legacy random number generation methods. Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2025-07-03setup CI and tidy to use typos for spellchecking and fix few typosklensy-3/+3
2025-06-06std: sys: random: uefi: Provide rdrand based fallbackAyush Singh-19/+150
Some UEFI systems based on American Megatrends Inc. v3.3 do not provide RNG support [1]. So fallback to rdrand in such cases. [1]: https://github.com/rust-lang/rust/issues/138252#issuecomment-2891270323 Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2025-04-27use generic Atomic type where possibleChristopher Durham-6/+6
in core/alloc/std only for now, and ignoring test files Co-authored-by: Pavel Grigorenko <GrigorenkoPV@ya.ru>
2025-03-26Change the syntax of the internal `weak!` macroMads Marquart-4/+4
Change the syntax to include parameter names and a trailing semicolon. Motivation: - Mirror the `syscall!` macro. - Allow rustfmt to format it (when wrapped in parentheses). - For better documentation (having the parameter names available in the source code is a bit nicer). - Allow future improvements to this macro where we can sometimes use the symbol directly when it's statically known to be available.
2025-03-19Fix build failure on TrustyTaiki Endo-1/+1
2025-03-17Rollup merge of #137621 - Berrysoft:cygwin-std, r=joboetJacob Pratt-4/+4
Add std support to cygwin target
2025-03-10Apply rustc-0023-Add-Trusty-OS-support-to-Rust-std.patchNicole LeGare-0/+10
2025-03-10Unify cygwin & horizon random impl王宇逸-15/+4
2025-03-10Impl cygwin rand with getrandom王宇逸-11/+13
2025-03-10Fix code style王宇逸-2/+6
2025-03-10Fix building for cygwin王宇逸-2/+7
2025-02-19Fix `*-win7-windows-msvc` target since 26eeac1a1e9fe46ffd80dd0d3dafdd2c2a644306Li Keqing-1/+1
2025-02-09Mark extern blocks as unsafeMichael Goulet-4/+4
2024-11-21Use arc4random of libc for RTEMS targetJan Sommer-2/+0
Is available since libc 0.2.162
2024-10-25library: consistently use American spelling for 'behavior'Ralf Jung-2/+2
2024-10-22AIX use /dev/urandom for implHenry Jiang-0/+1
2024-10-18Add entropy source for RTEMSJan Sommer-0/+3
2024-09-24Initial std library support for NuttXHuang Qi-0/+1
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2024-09-23std: switch to faster random sources on macOS and most BSDsjoboet-86/+75
2024-09-23std: implement the `random` featurejoboet-0/+605
Implements the ACP https://github.com/rust-lang/libs-team/issues/393.