Joe Richey

Results 133 comments of Joe Richey

We just ran into an interesting bug (or feature, not sure) around `-Z minimal-versions`. `getrandom` (the OS-specific code for `rand`) attempts to have correctly specified minimum versions by running [a...

> Redox (MIT-licensed) provides better pure-Rust implementations of those functions at https://gitlab.redox-os.org/redox-os/kernel/-/blob/master/src/externs.rs I would caution against using Redox's (current) `memcpy` implementation as it relies on undefined behavior (doing an unaligned...

@pca006132 I think similar to #365, we could also add optimized variants of `memcpy` and friends for `aarch64`. I'm not sure what the best implementation would be for that architecture....

We could also add an optimized version using RISC-V's Vector Extension (aka the V Extension). This idea was explored in [this Reddit post](https://www.reddit.com/r/RISCV/comments/ppspd6/arm_adds_memcpymemset_instructions_should_riscv/) and [this writeup](https://hoult.org/d1_memcpy.txt). It seems fairly fast...

We encountered a similar issue in https://github.com/cloud-hypervisor/rust-hypervisor-firmware/pull/69 where the following three features in combination resulted in a link failure: - LTO - debug build - `-Zbuild-std` However, our issues weren't...

So it seems like a lot of stuff calls `core::intrinsics::const_eval_select`, would it be possible to mark it as `#[inline(always)]` to avoid such issues?

@theCapypara it might be worth it to mention your issue in https://github.com/rust-lang/rust/issues/96486

> So this is probably a `rust` issue instead of a `compiler-builtins` issue. Agreed. Interestingly, just copying in the `compiler-builtins` Rust implementation into the same file seems to have everything...

We had to remove stdweb from our CI (https://github.com/rust-random/getrandom/pull/154) due to this. Is there a way to work around this issue?

I mean the algorithms haven't even been released yet, and I thought standardization wasn't on track until 2024?