[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <DF05YSVN174B.XRTT5CHPF0N0@nvidia.com>
Date: Wed, 17 Dec 2025 12:15:59 +0900
From: "Alexandre Courbot" <acourbot@...dia.com>
To: "Matthew Maurer" <mmaurer@...gle.com>, "Miguel Ojeda"
<ojeda@...nel.org>, "Boqun Feng" <boqun.feng@...il.com>, "Gary Guo"
<gary@...yguo.net>, Björn Roy Baron
<bjorn3_gh@...tonmail.com>, "Benno Lossin" <lossin@...nel.org>, "Andreas
Hindborg" <a.hindborg@...nel.org>, "Alice Ryhl" <aliceryhl@...gle.com>,
"Trevor Gross" <tmgross@...ch.edu>, "Danilo Krummrich" <dakr@...nel.org>
Cc: <rust-for-linux@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 3/3] rust: Support deriving `AsBytes`/`FromBytes` on
bindgen types
On Tue Dec 16, 2025 at 9:44 AM JST, Matthew Maurer wrote:
> To support this, we need to move the `transmute` module into a separate
> crate to allow the `bindings` crate to depend on it. Most user code is
> still expected to address the module as `kernel::transmute`, which is a
> re-export. `ffi::transmute` is now available for use in `bindings`.
>
> Signed-off-by: Matthew Maurer <mmaurer@...gle.com>
Maybe this should be two commits, one for the new crate, another one to
introduce the ability to use on bindgen types.
I have tried this with the Nova bindings, and somehow could not get past
this error:
error[E0433]: failed to resolve: could not find `ffi` in the list of imported crates
--> ../drivers/gpu/nova-core/gsp/fw/r570_144/bindings.rs:321:54
|
321 | #[derive(Debug, Default, Copy, Clone, MaybeZeroable, FromBytesFfi)]
| ^^^^^^^^^^^^ could not find `ffi` in the list of imported crates
|
= note: this error originates in the derive macro `FromBytesFfi` (in Nightly builds, run with -Z macro-backtrace for more info)
I do have `kernel::ffi` imported in the bindings module though, so I am
not quite sure what this is about. Any idea?
Powered by blists - more mailing lists