Re: [PATCH v2 3/5] rust: add #[export] macro

2025-03-03 Thread Alice Ryhl
On Fri, Feb 28, 2025 at 4:40 PM Tamir Duberstein wrote: > > On Fri, Feb 28, 2025 at 7:40 AM Alice Ryhl wrote: > > > > Rust has two different tools for generating function declarations to > > call across the FFI boundary: > > > > * bindgen. Generates Rust declarations from a C header. > > * cbindg

Re: [PATCH v2 3/5] rust: add #[export] macro

2025-02-28 Thread Tamir Duberstein
On Fri, Feb 28, 2025 at 10:49 AM Miguel Ojeda wrote: > > On Fri, Feb 28, 2025 at 4:41 PM Tamir Duberstein wrote: > > > > This needs an update given Miguel's comments on the cover letter. I > > wonder if the code should also justify the choice (over cbindgen). > > `cbindgen` is a longer term thing

Re: [PATCH v2 3/5] rust: add #[export] macro

2025-02-28 Thread Tamir Duberstein
On Fri, Feb 28, 2025 at 7:40 AM Alice Ryhl wrote: > > Rust has two different tools for generating function declarations to > call across the FFI boundary: > > * bindgen. Generates Rust declarations from a C header. > * cbindgen. Generates C headers from Rust declarations. > > In the kernel, we onl

Re: [PATCH v2 3/5] rust: add #[export] macro

2025-02-28 Thread Miguel Ojeda
On Fri, Feb 28, 2025 at 4:41 PM Tamir Duberstein wrote: > > This needs an update given Miguel's comments on the cover letter. I > wonder if the code should also justify the choice (over cbindgen). `cbindgen` is a longer term thing and more complex, assuming we use it in the end, so I think it is

Re: [PATCH v2 3/5] rust: add #[export] macro

2025-02-28 Thread Andreas Hindborg
"Alice Ryhl" writes: > Rust has two different tools for generating function declarations to > call across the FFI boundary: > > * bindgen. Generates Rust declarations from a C header. > * cbindgen. Generates C headers from Rust declarations. > > In the kernel, we only use bindgen. This is because

[PATCH v2 3/5] rust: add #[export] macro

2025-02-28 Thread Alice Ryhl
Rust has two different tools for generating function declarations to call across the FFI boundary: * bindgen. Generates Rust declarations from a C header. * cbindgen. Generates C headers from Rust declarations. In the kernel, we only use bindgen. This is because cbindgen assumes a cargo-based bui