From: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org,
"Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Daniel P. Berrangé " <berrange@redhat.com>,
"Thomas Huth" <thuth@redhat.com>,
"Philippe Mathieu-Daudé " <philmd@linaro.org>,
"Pierrick Bouvier" <pierrick.bouvier@linaro.org>,
"Richard Henderson" <richard.henderson@linaro.org>,
"Gustavo Romero" <gustavo.romero@linaro.org>,
"Alex Benné e" <alex.bennee@linaro.org>,
"Peter Maydell" <peter.maydell@linaro.org>,
"Junjie Mao" <junjie.mao@intel.com>,
"Zhao Liu" <zhao1.liu@intel.com>
Subject: Re: [PATCH RESEND v9 7/9] rust: add crate to expose bindings and interfaces
Date: Thu, 05 Sep 2024 10:50:33 +0300 [thread overview]
Message-ID: <jbxxi.e6usblfysvwu@linaro.org> (raw)
In-Reply-To: <CABgObfbe1tFWb1yogUskbUszFyHjy_qhk0k6B9YrgBeVNTnDww@mail.gmail.com>
On Wed, 04 Sep 2024 14:01, Paolo Bonzini <pbonzini@redhat.com> wrote:
>On Wed, Aug 28, 2024 at 6:12 AM Manos Pitsidianakis
><manos.pitsidianakis@linaro.org> wrote:
>>
>> Add rust/qemu-api, which exposes rust-bindgen generated FFI bindings and
>> provides some declaration macros for symbols visible to the rest of
>> QEMU.
>
>The only comment I have is that I would drop the allocator support
>completely. It adds complications and, at least initially, we can
>plan/hope that all cross-language allocations go through a constructor
>function like error_setg() or object_new().
>
>In the case of QOM, if we wanted to allocate objects in a Box rather
>than malloc-ed memory, we could also put in the object a free function
>that calls
>
> mem::drop(Box::from_raw(p))
>
>Fixing rust.bindgen() to use the right CLANG_PATH/LIBCLANG_PATH should
>probably be done in meson itself. The (not too hard) alternative is to
>just use a custom_target.
Can we get the include directories of common_ss.all_dependencies() for a
custom_target? Meson does this:
for de in kwargs['dependencies']:
for i in de.get_include_dirs():
clang_args.extend([f'-I{x}' for x in i.to_string_list(
state.environment.get_source_dir(), state.environment.get_build_dir())])
clang_args.extend(de.get_all_compile_args())
for s in de.get_sources():
if isinstance(s, File):
depend_files.append(s)
elif isinstance(s, CustomTarget):
depends.append(s)
But I think the functionality to extract this info from dep objects is
not exposed to meson.build files.
next prev parent reply other threads:[~2024-09-05 7:54 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-28 4:11 [PATCH RESEND v9 0/9] Add Rust build support, ARM PL011 device impl Manos Pitsidianakis
2024-08-28 4:11 ` [PATCH RESEND v9 1/9] Require meson version 1.5.0 Manos Pitsidianakis
2024-08-28 10:43 ` Alex Bennée
2024-08-28 4:11 ` [PATCH RESEND v9 2/9] build-sys: Add rust feature option Manos Pitsidianakis
2024-08-28 11:26 ` Alex Bennée
2024-08-28 4:11 ` [PATCH RESEND v9 3/9] configure, meson: detect Rust toolchain Manos Pitsidianakis
2024-08-28 12:11 ` Alex Bennée
2024-08-28 12:28 ` Daniel P. Berrangé
2024-09-04 11:03 ` Paolo Bonzini
2024-09-04 11:32 ` Paolo Bonzini
2024-08-28 4:11 ` [PATCH RESEND v9 4/9] rust: add bindgen step as a meson dependency Manos Pitsidianakis
2024-08-28 4:11 ` [PATCH RESEND v9 5/9] .gitattributes: add Rust diff and merge attributes Manos Pitsidianakis
2024-08-28 4:11 ` [PATCH RESEND v9 6/9] meson.build: add HAVE_GLIB_WITH_ALIGNED_ALLOC flag Manos Pitsidianakis
2024-08-28 13:15 ` Alex Bennée
2024-08-28 4:11 ` [PATCH RESEND v9 7/9] rust: add crate to expose bindings and interfaces Manos Pitsidianakis
2024-08-28 13:08 ` Alex Bennée
2024-08-30 1:19 ` Junjie Mao
2024-08-30 6:43 ` Manos Pitsidianakis
2024-08-30 8:50 ` Junjie Mao
2024-08-30 11:03 ` Alex Bennée
2024-08-31 8:25 ` Manos Pitsidianakis
2024-09-02 5:58 ` Junjie Mao
2024-09-06 7:56 ` Paolo Bonzini
2024-09-04 11:01 ` Paolo Bonzini
2024-09-05 3:05 ` Junjie Mao
2024-09-05 7:50 ` Manos Pitsidianakis [this message]
2024-08-28 4:11 ` [PATCH RESEND v9 8/9] rust: add utility procedural macro crate Manos Pitsidianakis
2024-08-28 4:11 ` [PATCH RESEND v9 9/9] rust: add PL011 device model Manos Pitsidianakis
2024-09-04 11:04 ` Paolo Bonzini
2024-09-06 10:41 ` Paolo Bonzini
2024-08-28 13:18 ` [PATCH RESEND v9 0/9] Add Rust build support, ARM PL011 device impl Alex Bennée
2024-09-04 11:31 ` Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jbxxi.e6usblfysvwu@linaro.org \
--to=manos.pitsidianakis@linaro.org \
--cc=alex.bennee@linaro.org \
--cc=berrange@redhat.com \
--cc=gustavo.romero@linaro.org \
--cc=junjie.mao@intel.com \
--cc=marcandre.lureau@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@linaro.org \
--cc=pierrick.bouvier@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=thuth@redhat.com \
--cc=zhao1.liu@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).