BurntSushi / memchr

Optimized string search routines for Rust.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

New SIMD improvements break MSRV for aarch64 targets

complexspaces opened this issue · comments

Hey there, good evening,

While reviewing a rustls PR, we found that the latest verison of memchr was failing to compile with Rust 1.60 when targeting aarch64-linux-android:

error[E0658]: the target feature `neon` is currently unstable
   --> /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/memchr-2.6.2/src/arch/aarch64/neon/memchr.rs:888:22
    |
888 |     #[target_feature(enable = "neon")]
    |                      ^^^^^^^^^^^^^^^
    |
    = note: see issue #44839 <https://github.com/rust-lang/rust/issues/44839> for more information

The source of this problem looks to be the new SIMD implementations in #129. While target_feature has been stable for x86 targets for some time, it only stabilized for aarch64 targets in Rust 1.61. So memchr's use of it there has become incompatible with the currently declared MSRV of 1.60.

This is easily reproducible on main of this repository as well if you attempt to cross-compile memchr to any aarch64 target you have available.

Given that this is a pretty minor problem, and because 1.60 and 1.61 are only 6 weeks apart, I believe the simplest resolution may be to bump the MSRV one version further.

Nice catch. I'll just treat the Rust 1.60 MSRV as a bug and bump the MSRV to Rust 1.61, as you suggest.

Thanks for the quick response 🎉