Skip to content

Commit 8393dd1

Browse files
committed
Remove aarch64 feature and add stable aarch64 target actions workflow
1 parent 6e3d14e commit 8393dd1

File tree

5 files changed

+29
-23
lines changed

5 files changed

+29
-23
lines changed

.github/workflows/check.yml

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,28 @@ jobs:
104104
echo "$HOME/.wasmtime/bin" >> $GITHUB_PATH
105105
- name: Run tests
106106
run: cargo +${{steps.toolchain.outputs.name}} wasi test --workspace --all-features
107+
aarch64-stable:
108+
name: aarch64 stable
109+
runs-on: ubuntu-latest
110+
steps:
111+
- uses: actions/checkout@v4
112+
- name: Install cross-compilation toolchain
113+
run: |
114+
sudo apt update
115+
sudo apt install gcc-aarch64-linux-gnu
116+
- name: Install stable toolchain
117+
id: toolchain
118+
uses: dtolnay/rust-toolchain@master
119+
with:
120+
toolchain: stable
121+
components: clippy, rustfmt
122+
target: aarch64-unknown-linux-gnu
123+
- name: Build all targets
124+
run: cargo +${{steps.toolchain.outputs.name}} build --target aarch64-unknown-linux-gnu --workspace --all-targets
125+
env:
126+
RUSTFLAGS: -C linker=aarch64-linux-gnu-gcc
127+
- name: Run Clippy linter
128+
run: cargo +${{steps.toolchain.outputs.name}} clippy --target aarch64-unknown-linux-gnu --workspace --all-targets -- -D warnings
107129
aarch64-nightly:
108130
name: aarch64 nightly
109131
runs-on: ubuntu-latest
@@ -125,7 +147,7 @@ jobs:
125147
env:
126148
RUSTFLAGS: -C linker=aarch64-linux-gnu-gcc
127149
- name: Run Clippy linter
128-
run: cargo +${{steps.toolchain.outputs.name}} clippy --target aarch64-unknown-linux-gnu --workspace --all-targets --all-features -- -D warnings
150+
run: cargo +${{steps.toolchain.outputs.name}} clippy --target aarch64-unknown-linux-gnu --workspace --all-targets --all-features -- -D warnings
129151
bench-stable:
130152
name: Benchmarks stable
131153
runs-on: ubuntu-latest

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,4 @@ memmap2 = "0.5"
2222
debug = true
2323

2424
[features]
25-
aarch64 = []
2625
stdsimd = []

src/bits.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,7 @@
22
#[multiversion::multiversion]
33
#[clone(target = "[x86|x86_64]+avx2")]
44
#[clone(target = "wasm32+simd128")]
5-
#[cfg_attr(
6-
all(target_arch = "aarch64", feature = "aarch64"),
7-
clone(target = "aarch64+neon")
8-
)]
5+
#[clone(target = "aarch64+neon")]
96
pub fn clear_leftmost_set(value: u32) -> u32 {
107
value & (value - 1)
118
}

src/lib.rs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#![cfg_attr(feature = "stdsimd", feature(portable_simd))]
99

1010
/// Substring search implementations using aarch64 architecture features.
11-
#[cfg(all(target_arch = "aarch64", feature = "aarch64"))]
11+
#[cfg(target_arch = "aarch64")]
1212
pub mod aarch64;
1313

1414
/// Substring search implementations using generic stdsimd features.
@@ -200,10 +200,7 @@ trait Searcher<N: NeedleWithSize + ?Sized> {
200200
#[multiversion::multiversion]
201201
#[clone(target = "[x86|x86_64]+avx2")]
202202
#[clone(target = "wasm32+simd128")]
203-
#[cfg_attr(
204-
all(target_arch = "aarch64", feature = "aarch64"),
205-
clone(target = "aarch64+neon")
206-
)]
203+
#[clone(target = "aarch64+neon")]
207204
unsafe fn vector_search_in_chunk<V: Vector>(
208205
&self,
209206
hash: &VectorHash<V>,
@@ -257,10 +254,7 @@ trait Searcher<N: NeedleWithSize + ?Sized> {
257254
#[multiversion::multiversion]
258255
#[clone(target = "[x86|x86_64]+avx2")]
259256
#[clone(target = "wasm32+simd128")]
260-
#[cfg_attr(
261-
all(target_arch = "aarch64", feature = "aarch64"),
262-
clone(target = "aarch64+neon")
263-
)]
257+
#[clone(target = "aarch64+neon")]
264258
unsafe fn vector_search_in<V: Vector>(
265259
&self,
266260
haystack: &[u8],

src/memcmp.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@ use std::slice;
44
#[multiversion::multiversion]
55
#[clone(target = "[x86|x86_64]+avx2")]
66
#[clone(target = "wasm32+simd128")]
7-
#[cfg_attr(
8-
all(target_arch = "aarch64", feature = "aarch64"),
9-
clone(target = "aarch64+neon")
10-
)]
7+
#[clone(target = "aarch64+neon")]
118
pub unsafe fn generic(left: *const u8, right: *const u8, n: usize) -> bool {
129
slice::from_raw_parts(left, n) == slice::from_raw_parts(right, n)
1310
}
@@ -16,10 +13,7 @@ pub unsafe fn generic(left: *const u8, right: *const u8, n: usize) -> bool {
1613
#[multiversion::multiversion]
1714
#[clone(target = "[x86|x86_64]+avx2")]
1815
#[clone(target = "wasm32+simd128")]
19-
#[cfg_attr(
20-
all(target_arch = "aarch64", feature = "aarch64"),
21-
clone(target = "aarch64+neon")
22-
)]
16+
#[clone(target = "aarch64+neon")]
2317
pub unsafe fn specialized<const N: usize>(left: *const u8, right: *const u8) -> bool {
2418
slice::from_raw_parts(left, N) == slice::from_raw_parts(right, N)
2519
}

0 commit comments

Comments
 (0)