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

2024-07-02 Thread Pierrick Bouvier
On 7/2/24 05:25, Manos Pitsidianakis wrote: On Mon, 01 Jul 2024 21:54, Pierrick Bouvier wrote: The ctor is not run, but, interesting point, there is the same problem on Linux :) Can you please confirm with a clean build this work on your machine with this v3, and report exact configure and run

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

2024-07-02 Thread Manos Pitsidianakis
On Mon, 01 Jul 2024 21:54, Pierrick Bouvier wrote: The ctor is not run, but, interesting point, there is the same problem on Linux :) Can you please confirm with a clean build this work on your machine with this v3, and report exact configure and run commands you use? On a clean checkout, I

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

2024-07-01 Thread Pierrick Bouvier
The ctor is not run, but, interesting point, there is the same problem on Linux :) Can you please confirm with a clean build this work on your machine with this v3, and report exact configure and run commands you use? Thanks, Pierrick On 6/29/24 01:06, Manos Pitsidianakis wrote: On Fri, 28

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

2024-07-01 Thread Pierrick Bouvier
Seems like the using cfg_attr was taken from this crate, so it should be equivalent to using it. On 6/28/24 14:50, Paolo Bonzini wrote: On Fri, Jun 28, 2024 at 9:12 PM Pierrick Bouvier wrote: However, even tough I can build the executable, I get this error: $ ./build/qemu-system-aarch64 -M vi

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

2024-06-29 Thread Manos Pitsidianakis
On Fri, 28 Jun 2024 22:12, Pierrick Bouvier wrote: I've been able to build rust device on windows, with a few tweaks needed. - specificy the target for libclang (used by bindgen), which targets MSVC by default (so different set of headers) - additional headers (libclang searches its own heade

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

2024-06-28 Thread Paolo Bonzini
On Fri, Jun 28, 2024 at 9:12 PM Pierrick Bouvier wrote: > However, even tough I can build the executable, I get this error: > $ ./build/qemu-system-aarch64 -M virt > C:\w\qemu\build\qemu-system-aarch64.exe: unknown type 'x-pl011-rust' > > Any idea of what could be missing here? Maybe the underlyi

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

2024-06-28 Thread Pierrick Bouvier
On 6/27/24 16:47, Pierrick Bouvier wrote: On 6/25/24 11:08, Manos Pitsidianakis wrote: On Tue, 25 Jun 2024 19:00, Zhao Liu wrote: [snip] This is for future-proofing the Rust integration in general. I haven't been able to compile under macos yet because bindgen cannot find the system clang hea

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

2024-06-27 Thread Pierrick Bouvier
On 6/25/24 11:08, Manos Pitsidianakis wrote: On Tue, 25 Jun 2024 19:00, Zhao Liu wrote: [snip] This is for future-proofing the Rust integration in general. I haven't been able to compile under macos yet because bindgen cannot find the system clang header. I also don't have a windows pc to test

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

2024-06-25 Thread Manos Pitsidianakis
On Tue, 25 Jun 2024 19:00, Zhao Liu wrote: [snip] This is for future-proofing the Rust integration in general. I haven't been able to compile under macos yet because bindgen cannot find the system clang header. I also don't have a windows pc to test it on. But it should work theoretically unde

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

2024-06-25 Thread Zhao Liu
> > > + # > WARNING: Project specifies a minimum meson_version '>=0.63.0' > > > but > > > + # > uses features which were added in newer versions: > > > + # > * 0.64.0: {'fs.copyfile'} > > > + # > * 1.0.0: {'dependencies arg in rust.bindgen', 'module rust as > > > stable mo

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

2024-06-24 Thread Stefan Hajnoczi
On Thu, 20 Jun 2024 at 14:35, Manos Pitsidianakis wrote: > > On Thu, 20 Jun 2024 15:32, Alex Bennée wrote: > >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 cre

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

2024-06-24 Thread Manos Pitsidianakis
Hello Zhao! On Mon, 24 Jun 2024 13:12, Zhao Liu wrote: Hi Manos, Thanks for your patch. I have a few comments below: diff --git a/meson.build b/meson.build index 3533889852..2b305e745a 100644 --- a/meson.build +++ b/meson.build @@ -3876,6 +3876,62 @@ foreach target : target_dirs lib_dep

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

2024-06-24 Thread Zhao Liu
Hi Manos, Thanks for your patch. I have a few comments below: > diff --git a/meson.build b/meson.build > index 3533889852..2b305e745a 100644 > --- a/meson.build > +++ b/meson.build > @@ -3876,6 +3876,62 @@ foreach target : target_dirs > lib_deps += dep.partial_dependency(compile_args: true,

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

2024-06-20 Thread Richard Henderson
On 6/20/24 11:36, Manos Pitsidianakis wrote: On Thu, 20 Jun 2024 17:01, Richard Henderson wrote: On 6/19/24 13:13, Manos Pitsidianakis wrote: +# FIXME: These are the latest stable versions, refine to actual minimum ones. +msrv = { +  'rustc': '1.79.0', +  'cargo': '1.79.0', +  'bindgen': '0.6

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

2024-06-20 Thread Manos Pitsidianakis
On Thu, 20 Jun 2024 17:01, Richard Henderson wrote: On 6/19/24 13:13, Manos Pitsidianakis wrote: +# FIXME: These are the latest stable versions, refine to actual minimum ones. +msrv = { + 'rustc': '1.79.0', + 'cargo': '1.79.0', + 'bindgen': '0.69.4', +} A note for other rust newbies: The

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

2024-06-20 Thread Manos Pitsidianakis
On Thu, 20 Jun 2024 15:32, Alex Bennée wrote: 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/{targe

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

2024-06-20 Thread Manos Pitsidianakis
On Thu, 20 Jun 2024 15:34, Paolo Bonzini wrote: On Thu, Jun 20, 2024 at 1:10 PM Alex Bennée wrote: > +# FIXME: These are the latest stable versions, refine to actual minimum ones. > +msrv = { > + 'rustc': '1.79.0', > + 'cargo': '1.79.0', > + 'bindgen': '0.69.4', > +} So for Debian Bookworm

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

2024-06-20 Thread Richard Henderson
On 6/19/24 13:13, Manos Pitsidianakis wrote: +# FIXME: These are the latest stable versions, refine to actual minimum ones. +msrv = { + 'rustc': '1.79.0', + 'cargo': '1.79.0', + 'bindgen': '0.69.4', +} A note for other rust newbies: These versions are pretty darn close to actual minima. Ub

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

2024-06-20 Thread Paolo Bonzini
On Thu, Jun 20, 2024 at 1:10 PM Alex Bennée wrote: > > +# FIXME: These are the latest stable versions, refine to actual minimum > > ones. > > +msrv = { > > + 'rustc': '1.79.0', > > + 'cargo': '1.79.0', > > + 'bindgen': '0.69.4', > > +} > > So for Debian Bookworm this comes out as: > > msrv =

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

2024-06-20 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 v3 2/5] rust: add bindgen step as a meson dependency

2024-06-20 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

[RFC PATCH v3 2/5] rust: add bindgen step as a meson dependency

2024-06-19 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