tkaitchuck / aHash

aHash is a non-cryptographic hashing algorithm that uses the AES hardware instruction
https://crates.io/crates/ahash
Apache License 2.0
1.03k stars 101 forks source link

fix: #170 compile fail on aarch64 #171

Closed PureWhiteWu closed 11 months ago

PureWhiteWu commented 11 months ago

fixes #170

joshlf commented 11 months ago

If you're feeling really ambitious, maybe you could add CI jobs for arm and aarch64? @tkaitchuck would have to say whether they're interested in taking such a change, but I assume they'd be interested.

PureWhiteWu commented 11 months ago

@joshlf Hi, I'd love to, but I'm not quite sure if github action provides aarch64 machines?

joshlf commented 11 months ago

Yeah you'd probably want to cross-compile using cargo build --tests --target. You can also use cargo miri test --target to emulate tests on another target. Since this crate uses intrinsics, that might not work, but at least cross-compiling with cargo build should.

If you want to do a fuller overhaul (I'd run it by @tkaitchuck and probably do it in a different PR), you could use a job matrix like we do in zerocopy: https://github.com/google/zerocopy/blob/e2ae4f821fea88ad2a4c4ca3478cf595bef4b5f6/.github/workflows/ci.yml#L23

PureWhiteWu commented 11 months ago

Thanks for your suggestion! I've added aarch64-apple-darwin target in ci.