Open Amanieu opened 3 years ago
Do I understand correctly that a side effect of this issue is the disappearance of ARMv8 cryptography extensions which would help fixing an issue with Sha1/2 asm builds on Apple Silicon (and maybe others)?
If so and the fix truly is what’s described here then I could try to submit a PR as it prevents gitoxide
from outperforming git on my machine 😅.
I haven't looked at the cryptographic extensions in detail, but it should be fairly easy to resolve. In the longer term we need better code organization in the ARM code to separate:
I think I should be able to produce a simple PR based on the suggestion here as TARGET=aarch64-apple-darwin cargo test
already runs all tests successfully on nightly in the core_arch
crate. That should be all that's needed to be reasonably sure the change isn't entirely broken.
Conceptually this is quite simple, wherever there is a
cfg
that checks for a particulartarget_arch
, we also need to enable it ifdoc
is true. We then need to tell rustdoc that the intrinsic is only available on a particular architecture with#[cfg(doc(target_arch = "..."))]
.Basically we turn this:
Into this:
A quick search shows the following uses of
target_arch
that need to be fixed: