On Thu, 2 May 2024 at 09:02, Daniel P. Berrangé <berra...@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