From ddb252d4bc33465f8a3c792399ad2eb8eb08ced5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Gonz=C3=A1lez?= Date: Tue, 13 Feb 2024 10:52:59 +0100 Subject: [PATCH 1/2] Fix build on latest nightlies when using the `nightly` feature As described in https://github.com/mcountryman/simd-adler32/issues/15, the `stdsimd` feature was removed. I have tested that these changes do not introduce any behavior changes by running the defined unit tests. --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index e61dddd..abfbc64 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -77,7 +77,7 @@ //! //! Feature detection tries to use the fastest supported feature first. #![cfg_attr(not(feature = "std"), no_std)] -#![cfg_attr(feature = "nightly", feature(stdsimd, avx512_target_feature))] +#![cfg_attr(feature = "nightly", feature(stdarch_x86_avx512, avx512_target_feature))] #[doc(hidden)] pub mod hash; From 3d182319b4c5b894186fec75de2395db030a4d70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Gonz=C3=A1lez?= Date: Tue, 13 Feb 2024 18:42:05 +0100 Subject: [PATCH 2/2] Only enable AVX512 features for x86(-64) targets --- src/lib.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index abfbc64..1ee545e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -77,7 +77,10 @@ //! //! Feature detection tries to use the fastest supported feature first. #![cfg_attr(not(feature = "std"), no_std)] -#![cfg_attr(feature = "nightly", feature(stdarch_x86_avx512, avx512_target_feature))] +#![cfg_attr( + all(feature = "nightly", any(target_arch = "x86", target_arch = "x86_64")), + feature(stdarch_x86_avx512, avx512_target_feature) +)] #[doc(hidden)] pub mod hash;