Re: [RFC PATCH 01/11] rust: add abstraction for struct device

From: Miguel Ojeda
Date: Mon May 20 2024 - 14:25:36 EST


On Mon, May 20, 2024 at 8:00 PM Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx> wrote:
>
> What's the status of moving .rs files next to their respective .c files
> in the build system? Keeping them separate like this just isn't going
> to work, sorry.

In progress.

> > +//! Generic devices that are part of the kernel's driver model.
> > +//!
> > +//! C header: [`include/linux/device.h`](../../../../include/linux/device.h)
>
> relative paths for a common "include <linux/device.h" type of thing?
> Rust can't handle include paths from directories?

We have the custom `srctree/` notation for that (which the patch should use).

And eventually we should have support for easy-to-use links to C
structs and so on (i.e. to the C docs) -- today I happened to be
talking to the `rustdoc` maintainers about this old idea of ours.

Cheers,
Miguel