From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: "Manos Pitsidianakis" <manos.pitsidianakis@linaro.org>,
qemu-devel@nongnu.org, "Stefan Hajnoczi" <stefanha@redhat.com>,
"Mads Ynddal" <mads@ynddal.dk>,
"Peter Maydell" <peter.maydell@linaro.org>,
"Alex Bennée" <alex.bennee@linaro.org>,
"Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Thomas Huth" <thuth@redhat.com>,
"Markus Armbruster" <armbru@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Zhao Liu" <zhao1.liu@intel.com>,
"Gustavo Romero" <gustavo.romero@linaro.org>,
"Pierrick Bouvier" <pierrick.bouvier@linaro.org>,
rowan.hart@intel.com,
"Richard Henderson" <richard.henderson@linaro.org>
Subject: Re: [RFC PATCH v4 0/7] Add Rust support, implement ARM PL011
Date: Mon, 8 Jul 2024 17:33:12 +0100 [thread overview]
Message-ID: <ZowUyFX7zcK1FvuG@redhat.com> (raw)
In-Reply-To: <8dfd1047-436d-4157-83cb-9cad399544fe@redhat.com>
On Mon, Jul 08, 2024 at 06:26:22PM +0200, Paolo Bonzini wrote:
> On 7/4/24 14:15, Manos Pitsidianakis wrote:
> > Changes from v3->v4:
> > - Add rust-specific files to .gitattributes
> > - Added help text to scripts/cargo_wrapper.py arguments (thanks Stephan)
> > - Split bindings separate crate
> > - Add declarative macros for symbols exported to QEMU to said crate
> > - Lowered MSRV to 1.77.2
> > - Removed auto-download and install of bindgen-cli
> > - Fixed re-compilation of Rust objects in case they are missing from
> > filesystem
> > - Fixed optimized builds by adding #[used] (thanks Pierrick for the help
> > debugging this)
>
> I think the largest issue is that I'd rather have a single cargo build using
> a virtual manifest, because my hunch is that it'd be the easiest path
> towards Kconfig integration. But it's better to do this after merge, as the
> changes are pretty large. It's also independent from any other changes
> targeted at removing unsafe code, so no need to hold back on merging.
>
> Other comments I made that should however be addressed before merging, from
> most to least important:
>
> - TODO comments when the code is doing potential undefined behavior
>
> - module structure should IMO resemble the C part of the tree
>
> - only generate bindings.rs.inc once
>
> - a couple abstractions that I'd like to have now: a trait to store the CStr
> corresponding to the structs, and one to generate all-zero structs without
> having to type "unsafe { MaybeUninit::zeroed().assume_init() }"
>
> - I pointed out a couple lints that are too broad and should be enabled
> per-file, even if right now it's basically all files that include them.
>
> - add support for --cargo and CARGO environment variables (if my patch works
> without too much hassle)
>
> - I'd like to use ctor instead of non-portable linker magic, and the cstr
> crate instead of CStr statics or c""
>
> - please check if -Wl,--whole-archive can be replaced with link_whole:
>
> - probably, until Rust is enabled by default we should treat dependencies as
> a moving target and not commit Cargo.lock files. In the meanwhile we can
> discuss how to handle them.
>
> And a few aesthetic changes on top of this.
This series is still missing changes to enable build on all targets
during CI, including cross-compiles, to prove that we're doing the
correct thing on all our targetted platforms. That's a must have
before considering it suitable for merge.
I also believe we should default to enabling rust toolchain by
default in configure, and require and explicit --without-rust
to disable it, *despite* it not technically being a mandatory
feature....yet.
This is to give users a clear message that Rust is likely to
become a fundamental part of QEMU, so they need to give feedback
if they hit any problems / have use cases we've not anticipated
that are problematic wrt Rust.
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
next prev parent reply other threads:[~2024-07-08 16:34 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-04 12:15 [RFC PATCH v4 0/7] Add Rust support, implement ARM PL011 Manos Pitsidianakis
2024-07-04 12:15 ` [RFC PATCH v4 1/7] build-sys: Add rust feature option Manos Pitsidianakis
2024-07-08 14:49 ` Paolo Bonzini
2024-07-04 12:15 ` [RFC PATCH v4 2/7] rust: add bindgen step as a meson dependency Manos Pitsidianakis
2024-07-08 15:07 ` Paolo Bonzini
2024-07-09 10:53 ` Alex Bennée
2024-07-09 12:08 ` Peter Maydell
2024-07-09 12:28 ` Paolo Bonzini
2024-07-09 13:00 ` Daniel P. Berrangé
2024-07-11 21:23 ` Pierrick Bouvier
2024-07-12 6:14 ` Manos Pitsidianakis
2024-07-09 14:23 ` Alex Bennée
2024-07-10 15:03 ` Zhao Liu
2024-07-10 14:50 ` Paolo Bonzini
2024-07-11 8:30 ` Zhao Liu
2024-07-09 14:52 ` Alex Bennée
2024-07-10 8:55 ` Alex Bennée
2024-07-04 12:15 ` [RFC PATCH v4 3/7] rust: add crate to expose bindings and interfaces Manos Pitsidianakis
2024-07-08 15:40 ` Paolo Bonzini
2024-07-04 12:15 ` [RFC PATCH v4 4/7] rust: add PL011 device model Manos Pitsidianakis
2024-07-08 16:07 ` Paolo Bonzini
2024-07-04 12:15 ` [RFC PATCH v4 5/7] .gitattributes: add Rust diff and merge attributes Manos Pitsidianakis
2024-07-10 8:44 ` Alex Bennée
2024-07-04 12:15 ` [RFC PATCH v4 6/7] DO NOT MERGE: add rustdoc build for gitlab pages Manos Pitsidianakis
2024-07-04 12:15 ` [RFC PATCH v4 7/7] DO NOT MERGE: replace TYPE_PL011 with x-pl011-rust in arm virt machine Manos Pitsidianakis
2024-07-08 16:26 ` [RFC PATCH v4 0/7] Add Rust support, implement ARM PL011 Paolo Bonzini
2024-07-08 16:33 ` Daniel P. Berrangé [this message]
2024-07-08 16:55 ` Paolo Bonzini
2024-07-08 17:12 ` Daniel P. Berrangé
2024-07-08 18:34 ` Paolo Bonzini
2024-07-08 18:39 ` Manos Pitsidianakis
2024-07-08 18:48 ` Paolo Bonzini
2024-07-09 7:38 ` Manos Pitsidianakis
2024-07-09 7:54 ` Paolo Bonzini
2024-07-09 12:18 ` Daniel P. Berrangé
2024-07-09 16:51 ` Paolo Bonzini
2024-07-09 18:02 ` Richard Henderson
2024-07-09 10:34 ` Manos Pitsidianakis
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=ZowUyFX7zcK1FvuG@redhat.com \
--to=berrange@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=armbru@redhat.com \
--cc=gustavo.romero@linaro.org \
--cc=mads@ynddal.dk \
--cc=manos.pitsidianakis@linaro.org \
--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=rowan.hart@intel.com \
--cc=stefanha@redhat.com \
--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).