QEMU-Devel Archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: "Daniel P. Berrangé" <berrange@redhat.com>
Cc: Roman Kiryanov <rkir@google.com>,
	QEMU Developers <qemu-devel@nongnu.org>,
	 JP Cottin <jpcottin@google.com>,
	Erwin Jansen <jansene@google.com>
Subject: Re: QEMU headers in C++
Date: Thu, 2 May 2024 16:17:02 +0100	[thread overview]
Message-ID: <CAFEAcA_k5GUY5meTzpXXSDF3xFMrP-rpY6srbK=JZmay=BHTuA@mail.gmail.com> (raw)
In-Reply-To: <ZjNIOfJdmLGAJnKh@redhat.com>

On Thu, 2 May 2024 at 09:02, Daniel P. Berrangé <berrange@redhat.com> wrote:
>
> On Wed, May 01, 2024 at 09:40:16PM -0700, Roman Kiryanov wrote:
> > Hi QEMU,
> >
> > I work in Android Studio Emulator and we would like to develop devices
> > in C++. Unfortunately, QEMU headers cannot be used with C++ as is
> > (e.g. they use C++ keywords as variable names or implicitly cast void*
> > to T*).
>
> NB, in recent past QEMU explicitly eliminated almost[1] all C++ code from
> the tree, because the consensus was to be exlcusively a C project.
>
> > Will QEMU be open to accept patches from us to make QEMU headers C++
> > compatible?
>
> Personally I think that'd be a retrograde step. Any downstream development
> fork that made use of that facility would be not be able to feed changes
> / additions back into upstream QEMU codebase at a later date, without QEMU
> accepting C++ code once again.
>
> We'll never control what forks can do, and many will never feed back code
> regardless, but IMHO we should be steering external developers in a way
> that keeps open the door for their changes to be merged back upstream.

Yes, I agree. If you try to write device models in C++ then you're
pretty heavily committing to never being able to upstream this stuff,
plus you'll have a chunk of your codebase which is entirely
"nobody else in the world does this this way". I really wouldn't
recommend that.

thanks
-- PMM


  reply	other threads:[~2024-05-02 15:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-02  4:40 QEMU headers in C++ Roman Kiryanov
2024-05-02  6:19 ` Thomas Huth
2024-05-02 14:47   ` Warner Losh
2024-05-02  8:02 ` Daniel P. Berrangé
2024-05-02 15:17   ` Peter Maydell [this message]
     [not found] <a href="raw">
     [not found] ` </a>
2024-05-02 15:19   ` Paolo Bonzini
2024-05-02 16:04     ` Roman Kiryanov

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='CAFEAcA_k5GUY5meTzpXXSDF3xFMrP-rpY6srbK=JZmay=BHTuA@mail.gmail.com' \
    --to=peter.maydell@linaro.org \
    --cc=berrange@redhat.com \
    --cc=jansene@google.com \
    --cc=jpcottin@google.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rkir@google.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 read-only IMAP folder(s) and NNTP newsgroup(s).