@@ -3,10 +3,15 @@ rustflags = ["--cfg", "tokio_unstable"]
33rustdocflags = [" --cfg" , " tokio_unstable" ]
44
55[target .x86_64-unknown-linux-gnu ]
6- # Targeting x86-64-v2 gives a ~2% performance boost while only
7- # disallowing Intel CPUs older than 2008 and AMD CPUs older than 2011.
8- # None of those very old CPUs are used in GCP
9- # (https://cloud.google.com/compute/docs/cpu-platforms). Unfortunately,
10- # AWS does not seem to disclose the exact CPUs they use.
11- rustflags = [" -C" , " target-cpu=x86-64-v2" , " --cfg" , " tokio_unstable" ]
6+ # x86-64-v3 requires AVX2, BMI1/BMI2, FMA — available on Intel Haswell (2013)+
7+ # and AMD Zen 1 (2017)+. Covers all current-gen AWS and GCP instance families.
8+ # GCP N1 on Sandy/Ivy Bridge is the only notable exclusion (legacy, not recommended).
9+ # BMI2 (PEXT/PDEP) benefits bit-manipulation-heavy paths in Tantivy.
10+ rustflags = [" -C" , " target-cpu=x86-64-v3" , " --cfg" , " tokio_unstable" ]
11+
12+ [target .aarch64-unknown-linux-gnu ]
13+ # Targeting neoverse-n1 covers AWS Graviton2+ and GCP T2A (Ampere Altra).
14+ # Key gains over generic ARMv8-A: LSE atomics (better concurrency), dot
15+ # product instructions, and ARMv8.2 crypto extensions.
16+ rustflags = [" -C" , " target-cpu=neoverse-n1" , " --cfg" , " tokio_unstable" ]
1217
0 commit comments