Re: [PATCH 2/3] rust: xarray: abstract `xa_alloc_cyclic`

From: Onur Özkan
Date: Wed Oct 08 2025 - 01:34:16 EST


On Tue, 7 Oct 2025 19:28:31 +0200
Miguel Ojeda <miguel.ojeda.sandonis@xxxxxxxxx> wrote:

> On Tue, Oct 7, 2025 at 7:19 PM Onur Özkan <work@xxxxxxxxxxxxx> wrote:
> >
> > Why do we not like to use the bindings type directly?
>
> For public APIs, we generally try to avoid exposing C types:
>
> https://docs.kernel.org/rust/general-information.html#abstractions-vs-bindings
>
> Sometimes it still makes sense, of course, e.g. a method may return
> an inner type so that it gets used by other abstractions to call into
> C. But generally we want to avoid exposing those for drivers and other
> abstractions wherever possible.
>
> Cheers,
> Miguel

Thank you for explaining it, I will drop the bindings type in the next
version.

Regards,
Onur