building libcore for softfloat AArch64 emits future-incompat warnings / should `aarch64-unknown-none-softfloat` expose NEON API in `core::arch`?
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
I tried this code:
#![no_std]
#![no_main]
#[unsafe(no_mangle)]
pub fn _start() -> usize {
core::arch::aarch64::vaba_s8 as *const () as usize
}
#[panic_handler]
fn panic(_: &core::panic::PanicInfo) -> ! {
loop {}
}
compiled to the aarch64-unknown-none-softfloat target
$ cargo +nightly -Zbuild-std=core b --target aarch64-unknown-none-softfloat --release -v
warning: the following packages contain code that will be rejected by a future version of Rust: core v0.0.0 ($HOME/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core)
I expected to see this happen: building libcore should not emit a future-incompat warning OR NEON API should not be available under core::arch for this target OR both
Instead, this happened: building libcore emits a future-incompat warning so the build will probably break in the future.
NOTE The issue can also be reproduced with this x.py command so it's not specific to the -Z build-std feature.
$ export CC_aarch64_unknown_none_softfloat=aarch64-none-elf-gcc
$ ./x build --target aarch64-unknown-none-softfloat --stage 1 library/core
Meta
rustc --version --verbose:
rustc 1.94.0-nightly (31cd367b9 2026-01-08)
binary: rustc
commit-hash: 31cd367b9ca1ce359268e7adf4ea540408c0ad85
commit-date: 2026-01-08
host: x86_64-unknown-linux-gnu
release: 1.94.0-nightly
LLVM version: 21.1.8
Additional details
If I replay the Cargo command that builds libcore with the --future-incompat-report flag and then print the report with cargo report future-incompatibilities --id 1 I get a bunch of warnings that point into the core_arch module / crate.
> warning: enabling the `neon` target feature on the current target is unsound due to ABI issues
> --> /home/jorge/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/generated.rs:29255:18
> |
> 29255 | #[target_feature(enable = "neon")]
> | ^^^^^^^^^^^^^^^
> |
> = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
> = note: for more information, see issue #134375 <https://github.com/rust-lang/rust/issues/134375>
>
> warning: enabling the `neon` target feature on the current target is unsound due to ABI issues
> --> /home/jorge/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/generated.rs:29264:18
> |
> 29264 | #[target_feature(enable = "neon")]
> | ^^^^^^^^^^^^^^^
> |
> = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
> = note: for more information, see issue #134375 <https://github.com/rust-lang/rust/issues/134375>
>
Given the discussion in https://github.com/rust-lang/rust/issues/134375 (enabling +neon for the AArch64 softfloat target is UB) perhaps the neon module should be cfg-ed away for the softfloat target.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the warning with the provided cargo -Zbuild-std command or x.py target build, then inspect the core_arch AArch64 Neon code, especially generated.rs and its target configuration. Determine how the softfloat target should expose Neon APIs without triggering the ABI warning; done means the core build no longer emits the future-incompatibility warning and the API exposure matches the target’s safety constraints.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100