rust/library
bors 6eb3e97d55 Auto merge of #116319 - BlackHoleFox:apple-rand-take-2, r=thomcc
Remove Apple RNG fallbacks and simplify implementation

Now that we have [higher Apple platform requirements](https://github.com/rust-lang/rust/pull/104385), the RNG code can be simplified a lot. Since `getentropy` still doesn't look to be usable outside macOS this implementation:
- Removes any macOS fallback paths and unconditionally links to `getentropy`
- Minimizes the implementation for everything else (iOS, watchOS, etc).

`CCRandomGenerateBytes` was added in iOS 8 which means that we can use it now. It and `SecRandomCopyBytes` have the exact same functionality, but the former has a simpler API and no longer requires libstd to link to `Security.framework` for one function. Its also available in all the other target's SDKs.

Why care about `getentropy` then though on macOS? Well, its still much more performant. Benchmarking shows it runs at ~2x the speed of `CCRandomGenerateBytes`, which makes sense since it directly pulls from the kernel vs going through its own generator etc.

Semi-related to a previous, but reverted, attempt at improving this logic in https://github.com/rust-lang/rust/pull/101011
2023-10-24 06:11:51 +00:00
..
alloc Update boxed.rs 2023-10-21 23:41:32 +05:30
backtrace@99faef833f Bump backtrace to 0.3.69 2023-08-22 15:01:14 -07:00
core use visibility to check unused imports and delete some stmts 2023-10-22 21:27:46 +08:00
panic_abort Rebase to master 2023-09-22 17:23:33 +05:30
panic_unwind Use pointers instead of usize addresses for landing pads 2023-10-10 09:59:39 +02:00
portable-simd use visibility to check unused imports and delete some stmts 2023-10-22 21:27:46 +08:00
proc_macro rustdoc: remove rust logo from non-Rust crates 2023-10-08 20:17:53 -07:00
profiler_builtins Bump cfg(bootstrap) 2023-08-23 20:05:14 -04:00
rtstartup Remove custom frame info registration on i686-pc-windows-gnu 2022-08-23 16:12:58 +08:00
rustc-std-workspace-alloc Replace libstd, libcore, liballoc in line comments. 2022-12-30 14:00:42 +01:00
rustc-std-workspace-core
rustc-std-workspace-std
std Auto merge of #116319 - BlackHoleFox:apple-rand-take-2, r=thomcc 2023-10-24 06:11:51 +00:00
stdarch@333e9e9977 Bump stdarch submodule 2023-10-02 23:43:35 +02:00
sysroot Expose compiler-builtins-weak-intrinsics feature for -Zbuild-std 2023-06-23 11:15:34 +01:00
test rustdoc: remove rust logo from non-Rust crates 2023-10-08 20:17:53 -07:00
unwind Use pointers instead of usize addresses for landing pads 2023-10-10 09:59:39 +02:00