From: Zhao Liu <zhao1.liu@intel.com>
To: "Daniel P. Berrangé" <berrange@redhat.com>
Cc: "Manos Pitsidianakis" <manos.pitsidianakis@linaro.org>,
qemu-devel@nongnu.org, "Stefan Hajnoczi" <stefanha@redhat.com>,
"Mads Ynddal" <mads@ynddal.dk>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"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>,
"Gustavo Romero" <gustavo.romero@linaro.org>,
"Pierrick Bouvier" <pierrick.bouvier@linaro.org>
Subject: Re: [RFC PATCH v1 0/6] Implement ARM PL011 in Rust
Date: Tue, 11 Jun 2024 17:53:45 +0800 [thread overview]
Message-ID: <ZmgeqY3Vkax7yfPw@intel.com> (raw)
In-Reply-To: <ZmgIUfqDjJuw2Chl@redhat.com>
On Tue, Jun 11, 2024 at 09:18:25AM +0100, Daniel P. Berrangé wrote:
> Date: Tue, 11 Jun 2024 09:18:25 +0100
> From: "Daniel P. Berrangé" <berrange@redhat.com>
> Subject: Re: [RFC PATCH v1 0/6] Implement ARM PL011 in Rust
>
> On Mon, Jun 10, 2024 at 09:22:35PM +0300, Manos Pitsidianakis wrote:
> > What are the issues with not using the compiler, rustc, directly?
> > -----------------------------------------------------------------
> > [whataretheissueswith] Back to [TOC]
> >
> > 1. Tooling
> > Mostly writing up the build-sys tooling to do so. Ideally we'd
> > compile everything without cargo but rustc directly.
> >
> > If we decide we need Rust's `std` library support, we could
> > investigate whether building it from scratch is a good solution. This
> > will only build the bits we need in our devices.
>
> Re-building 'std' for QEMU would be a no-go for many distros who
> will expect QEMU to use the distro provided 'std' package. So at
> most that would have to be an optional feature.
>
> > 2. Rust dependencies
> > We could go without them completely. I chose deliberately to include
> > one dependency in my UART implementation, `bilge`[0], because it has
> > an elegant way of representing typed bitfields for the UART's
> > registers.
> >
> > [0]: Article: https://hecatia-elegua.github.io/blog/no-more-bit-fiddling/
> > Crates.io page: https://crates.io/crates/bilge
> > Repository: https://github.com/hecatia-elegua/bilge
> >
> > Should QEMU use third-party dependencies?
> > -----------------------------------------
> > [shouldqemuusethirdparty] Back to [TOC]
> >
> > In my personal opinion, if we need a dependency we need a strong
> > argument for it. A dependency needs a trusted upstream source, a QEMU
> > maintainer to make sure it us up-to-date in QEMU etc.
>
> "strong" is a rather fuzzy term. In C we already have a huge number
> of build dependencies
>
> $ wc -l tests/lcitool/projects/qemu.yml
> 127 tests/lcitool/projects/qemu.yml
>
> we would have many more than that except that we're conservative
> about adding deps on things because getting new libraries into
> distros is quite painful, or we lag behind where we would want
> to be to stick with compat for old distro versions.
>
> In terms of Rust dependancies, I'd expect us to have fairly arbitrary
> dependancies used. If the dep avoids QEMU maintainers having to
> re-invent the wheel for something there is already a common crate
> for, then it is a good thing to use it. I'd almost go as far as
> encouraging use of external crates. Our maintainers should focus tmie
> on writing code that's delivers compelling features to QEMU, rather
> than re-creating common APIs that already have good crates.
So should a base lib be introduced to import and wrap all external
dependencies?
Sort of like osdep.h, so that specific Rust implementations can't import
external third-party libraries directly, but only through the base lib.
The advantage of this is that we can unify the management of external
dependencies and avoid “potentially/overly arbitrary” importing of
specific Rust implementations.
next prev parent reply other threads:[~2024-06-11 9:39 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-10 18:22 [RFC PATCH v1 0/6] Implement ARM PL011 in Rust Manos Pitsidianakis
2024-06-10 18:22 ` [RFC PATCH v1 1/6] build-sys: Add rust feature option Manos Pitsidianakis
2024-06-10 19:25 ` Stefan Hajnoczi
2024-06-11 14:19 ` Alex Bennée
2024-06-11 17:53 ` Manos Pitsidianakis
2024-06-11 18:25 ` Stefan Hajnoczi
2024-06-12 8:04 ` Daniel P. Berrangé
2024-06-12 8:25 ` Marc-André Lureau
2024-06-10 18:22 ` [RFC PATCH v1 3/6] DO NOT MERGE: add rustdoc build for gitlab pages Manos Pitsidianakis
2024-06-10 18:22 ` [RFC PATCH v1 4/6] DO NOT MERGE: replace TYPE_PL011 with x-pl011-rust in arm virt machine Manos Pitsidianakis
2024-06-10 18:22 ` [RFC PATCH v1 6/6] DO NOT MERGE: update rustdoc gitlab pages gen Manos Pitsidianakis
2024-06-10 19:37 ` [RFC PATCH v1 0/6] Implement ARM PL011 in Rust Pierrick Bouvier
2024-06-10 20:29 ` Manos Pitsidianakis
2024-06-10 21:38 ` Pierrick Bouvier
2024-06-11 5:47 ` Manos Pitsidianakis
2024-06-11 9:21 ` Alex Bennée
2024-06-11 15:32 ` Pierrick Bouvier
2024-06-11 8:02 ` Daniel P. Berrangé
2024-06-11 9:18 ` Alex Bennée
2024-06-11 10:57 ` Daniel P. Berrangé
2024-06-11 10:58 ` Manos Pitsidianakis
2024-06-11 11:09 ` Daniel P. Berrangé
2024-06-11 11:32 ` Manos Pitsidianakis
2024-06-11 12:51 ` Alex Bennée
2024-06-11 12:54 ` Daniel P. Berrangé
2024-06-11 12:45 ` Antonio Caggiano
2024-06-11 12:49 ` Manos Pitsidianakis
2024-06-10 19:59 ` Stefan Hajnoczi
2024-06-10 20:15 ` Manos Pitsidianakis
2024-06-10 20:47 ` Stefan Hajnoczi
2024-06-11 8:42 ` Daniel P. Berrangé
2024-06-11 9:30 ` Alex Bennée
2024-06-11 13:13 ` Paolo Bonzini
2024-06-11 8:11 ` Philippe Mathieu-Daudé
2024-06-11 8:18 ` Daniel P. Berrangé
2024-06-11 9:53 ` Zhao Liu [this message]
2024-06-11 10:50 ` Manos Pitsidianakis
2024-06-11 8:22 ` Daniel P. Berrangé
2024-06-11 9:45 ` Zhao Liu
2024-06-11 10:41 ` Manos Pitsidianakis
2024-06-11 14:32 ` Zhao Liu
2024-06-11 10:40 ` Manos Pitsidianakis
2024-06-11 13:16 ` Paolo Bonzini
2024-06-11 14:11 ` Daniel P. Berrangé
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=ZmgeqY3Vkax7yfPw@intel.com \
--to=zhao1.liu@intel.com \
--cc=alex.bennee@linaro.org \
--cc=armbru@redhat.com \
--cc=berrange@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=stefanha@redhat.com \
--cc=thuth@redhat.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).