Re: [PATCH v4 0/2] rust: add `Alignment` type

From: Alexandre Courbot
Date: Mon Sep 08 2025 - 07:55:39 EST


On Thu Aug 21, 2025 at 9:42 PM JST, Alexandre Courbot wrote:
> Basically a resend of the previous version, plus fixes to build with the
> MSRV (1.78).
>
> The first patch makes two additions:
>
> - Bring an equivalent of the nightly upstream `Alignment` type [2] with
> an identical public interface,
> - Add a new `Alignable` extension trait that provides a way to align
> values up or down according to an `Alignment`, and implement it on
> unsigned integer types.
>
> The second patch makes use of these in the Nova driver.
>
> [3] is recommended as a dependency, a small cleanup preventing an unwrap
> upon applying this series.
>
> [1] https://github.com/rust-lang/libs-team/issues/631
> [2] https://doc.rust-lang.org/std/ptr/struct.Alignment.html
> [3] https://lore.kernel.org/rust-for-linux/20250808-falcondma_256b-v1-1-15f911d89ffd@xxxxxxxxxx/
>
> Signed-off-by: Alexandre Courbot <acourbot@xxxxxxxxxx>

Gentle ping for this feature, how are we feeling about it?