Re: [RFC PATCH v4 2/7] rust: add bindgen step as a meson dependency

2024-07-11 Thread Manos Pitsidianakis
On Fri, 12 Jul 2024 00:23, Pierrick Bouvier wrote: On 7/9/24 06:00, Daniel P. Berrangé wrote: On Tue, Jul 09, 2024 at 02:28:38PM +0200, Paolo Bonzini wrote: On Tue, Jul 9, 2024 at 2:09 PM Peter Maydell wrote: * what is the actual baseline requirement? We definitely want to support "usi

Re: [RFC PATCH v4 2/7] rust: add bindgen step as a meson dependency

2024-07-11 Thread Pierrick Bouvier
On 7/9/24 06:00, Daniel P. Berrangé wrote: On Tue, Jul 09, 2024 at 02:28:38PM +0200, Paolo Bonzini wrote: On Tue, Jul 9, 2024 at 2:09 PM Peter Maydell wrote: * what is the actual baseline requirement? We definitely want to support "using rustup on an older system" (should be no probl

Re: [RFC PATCH v4 2/7] rust: add bindgen step as a meson dependency

2024-07-11 Thread Zhao Liu
On Wed, Jul 10, 2024 at 04:50:10PM +0200, Paolo Bonzini wrote: > Date: Wed, 10 Jul 2024 16:50:10 +0200 > From: Paolo Bonzini > Subject: Re: [RFC PATCH v4 2/7] rust: add bindgen step as a meson dependency > > On Wed, Jul 10, 2024 at 4:48 PM Zhao Liu wrote: > > > > On

Re: [RFC PATCH v4 2/7] rust: add bindgen step as a meson dependency

2024-07-10 Thread Paolo Bonzini
On Wed, Jul 10, 2024 at 4:48 PM Zhao Liu wrote: > > On Tue, Jul 09, 2024 at 02:28:38PM +0200, Paolo Bonzini wrote: > > > > Here are the stopping points that I found over the last couple weeks: > > > > 1.56.0: 2021 edition > > 1.59.0: const CStr::from_bytes_with_nul_unchecked (needed by cstr > > cr

Re: [RFC PATCH v4 2/7] rust: add bindgen step as a meson dependency

2024-07-10 Thread Zhao Liu
On Tue, Jul 09, 2024 at 02:28:38PM +0200, Paolo Bonzini wrote: > > Here are the stopping points that I found over the last couple weeks: > > 1.56.0: 2021 edition > 1.59.0: const CStr::from_bytes_with_nul_unchecked (needed by cstr > crate, see below) > 1.64.0: std::ffi::c_char > 1.65.0: Generic As

Re: [RFC PATCH v4 2/7] rust: add bindgen step as a meson dependency

2024-07-10 Thread Alex Bennée
Manos Pitsidianakis writes: > Add mechanism to generate rust hw targets that depend on a custom > bindgen target for rust bindings to C. > > + # We need one bindings_rs build target per arch target, so give them > + # arch-specific names. > + copy = fs.copyfile('rust/wrapper.h', >

Re: [RFC PATCH v4 2/7] rust: add bindgen step as a meson dependency

2024-07-09 Thread Alex Bennée
Alex Bennée writes: > Manos Pitsidianakis writes: > >> Add mechanism to generate rust hw targets that depend on a custom >> bindgen target for rust bindings to C. >> >> This way bindings will be created before the rust crate is compiled. >> >> The bindings will end up in BUILDDIR/{target}-genera

Re: [RFC PATCH v4 2/7] rust: add bindgen step as a meson dependency

2024-07-09 Thread Alex Bennée
Paolo Bonzini writes: > On Tue, Jul 9, 2024 at 2:09 PM Peter Maydell wrote: >> * what is the actual baseline requirement? We definitely want >>to support "using rustup on an older system" (should be no >>problem) and "current distro building QEMU using the distro's >>rust", I assume

Re: [RFC PATCH v4 2/7] rust: add bindgen step as a meson dependency

2024-07-09 Thread Daniel P . Berrangé
On Tue, Jul 09, 2024 at 02:28:38PM +0200, Paolo Bonzini wrote: > On Tue, Jul 9, 2024 at 2:09 PM Peter Maydell wrote: > > * what is the actual baseline requirement? We definitely want > >to support "using rustup on an older system" (should be no > >problem) and "current distro building QEM

Re: [RFC PATCH v4 2/7] rust: add bindgen step as a meson dependency

2024-07-09 Thread Paolo Bonzini
On Tue, Jul 9, 2024 at 2:09 PM Peter Maydell wrote: > * what is the actual baseline requirement? We definitely want >to support "using rustup on an older system" (should be no >problem) and "current distro building QEMU using the distro's >rust", I assume. It would certainly be nice t

Re: [RFC PATCH v4 2/7] rust: add bindgen step as a meson dependency

2024-07-09 Thread Peter Maydell
On Tue, 9 Jul 2024 at 11:53, Alex Bennée wrote: > > Manos Pitsidianakis writes: > > +msrv = { > > + 'rustc': '1.77.2', > > + 'cargo': '1.77.2', > > + 'bindgen': '0.69.4', > > +} > > This is still pretty bleeding edge (it even tripped up on the > .cargo/bin/cargo I have installed). This needs t

Re: [RFC PATCH v4 2/7] rust: add bindgen step as a meson dependency

2024-07-09 Thread Alex Bennée
Manos Pitsidianakis writes: > Add mechanism to generate rust hw targets that depend on a custom > bindgen target for rust bindings to C. > > This way bindings will be created before the rust crate is compiled. > > The bindings will end up in BUILDDIR/{target}-generated.rs and have the same > nam

Re: [RFC PATCH v4 2/7] rust: add bindgen step as a meson dependency

2024-07-08 Thread Paolo Bonzini
On Thu, Jul 4, 2024 at 2:16 PM Manos Pitsidianakis wrote: > > Add mechanism to generate rust hw targets that depend on a custom > bindgen target for rust bindings to C. > > This way bindings will be created before the rust crate is compiled. > > The bindings will end up in BUILDDIR/{target}-genera

[RFC PATCH v4 2/7] rust: add bindgen step as a meson dependency

2024-07-04 Thread Manos Pitsidianakis
Add mechanism to generate rust hw targets that depend on a custom bindgen target for rust bindings to C. This way bindings will be created before the rust crate is compiled. The bindings will end up in BUILDDIR/{target}-generated.rs and have the same name as a target: ninja aarch64-softmmu-gene