Re: Rust version requirement (was: [PATCH V2 3/3] powerpc: Enable Rust for ppc64le)

From: Alice Ryhl

Date: Mon Feb 16 2026 - 06:29:15 EST


On Mon, Feb 16, 2026 at 12:23:16PM +0100, J. Neuschäfer wrote:
> On Thu, Feb 05, 2026 at 09:12:01PM +0530, Mukesh Kumar Chaurasiya wrote:
> [...]
> > use rust version nightly-2026-01-28
> >
> > the latest one has some issue. I just raised a bug for the rustc
> > here[1].
> >
> > [1] https://github.com/rust-lang/rust/issues/152177
>
> Another reason to use a nightly version is that Rust inline assembly for
> PowerPC will only be stabilized[1] in version 1.94, so current release
> versions fail like this (tested with 1.91.1):
>
> error[E0658]: inline assembly is not stable yet on this architecture
> --> ../rust/kernel/sync/barrier.rs:19:14
> |
> 19 | unsafe { core::arch::asm!("") };
> | ^^^^^^^^^^^^^^^^^^^^
> |
> = note: see issue #93335 <https://github.com/rust-lang/rust/issues/93335> for more information
> = help: add `#![feature(asm_experimental_arch)]` to the crate attributes to enable
> = note: this compiler was built on 2025-11-07; consider upgrading it if it is out of date
>
> This is somewhat at odds with Documentation/process/changes.rst which
> only requires Rust 1.78. I wonder if the rust version requirement should
> generally be bumped, or if there should be arch-specific requirements
> somewhere in changes.rst or rust/arch-support.rst.
>
> Best regards,
> J. Neuschäfer
>
> [1]: https://github.com/rust-lang/rust/pull/147996

The MSRV is planned to be bumped to 1.85.

If it's available as a nightly feature on 1.78, then you can just add
#![feature(asm_experimental_arch)] to lib.rs, which already enables
several other stabilized feature on older compilers.

Otherwise powerpc support can always be gated to require a larger
rustc version than other platforms.

Alice