Re: [PATCH 02/22] rust: move pin-init API into its own directory

From: Fiona Behrens
Date: Wed Mar 05 2025 - 04:17:54 EST


Benno Lossin <benno.lossin@xxxxxxxxx> writes:

> In preparation of splitting off the pin-init crate from the kernel
> crate, move all pin-init API code (including proc-macros) into
> `rust/pin-init`.
>
> Moved modules have their import path adjusted via the `#[path = "..."]`
> attribute. This allows the files to still be imported in the kernel
> crate even though the files are in different directories.
>
> Code that is moved out of files (but the file itself stays where it is)
> is imported via the `include!` macro. This also allows the code to be
> moved while still being part of the kernel crate.
>
> Note that this commit moves the generics parsing code out of the GPL-2.0
> file `rust/macros/helpers.rs` into the Apache-2.0 OR MIT file
> `rust/pin_init/internal/src/helpers.rs`. I am the sole author of that
> code and it already is available with that license at [1].
> The same is true for the entry-points of the proc-macros `pin_data`,
> `pinned_drop` and `derive_zeroable` in `rust/macros/lib.rs` that are
> moved to `rust/pin_data/internal/src/lib.rs`. Although there are some
> smaller patches that fix the doctests.
>
> Link: https://github.com/Rust-for-Linux/pinned-init [1]
> Signed-off-by: Benno Lossin <benno.lossin@xxxxxxxxx>

Reviewed-by: Fiona Behrens <me@xxxxxxxxxx>