[Rust-VMM] VMM related bindings
Dr. David Alan Gilbert
dgilbert at redhat.com
Thu Apr 11 17:42:17 UTC 2019
* Zach Reizner (zachr at google.com) wrote:
> On Thu, Apr 11, 2019 at 2:34 AM Paolo Bonzini <pbonzini at redhat.com> wrote:
> > On 11/04/19 10:25, Samuel Ortiz wrote:
> > > In several cases, we need to generate kernel bindings for some of our
> > > crates (kvm, vhost, virtio), through rust-bindgen.
> > > There's been discussions about whether we should have those bindings as
> > > part of the related crate (e.g. a virtio/src/bindings.rs module for the
> > > virtio bindings) or as a separate crate (virtio-bindings,
> > > vhost-bindings, kvm-bindings).
> > >
> > > We (Andreea and myself) believe it makes more sense to have them as
> > > separate crates, and clearly distinguish generated bindings from actual
> > > code consuming them. It generates a few more repos, but that's a minor
> > > burden after all.
> > >
> > > Does anyone have strong opinions against that pattern?
> That's how we did it for `kvm-sys` and `kvm` inside of crosvm. I think the
> separation makes a lot of sense.
Yes, I'd like to see the separation so we can think more easily about
how to use virtio devices in external programs (i.e. vhost-user
> > No objections for kvm-bindings and vhost-bindings; however, for virtio
> > and vhost-user I would just write everything by hand (or clean up
> > bindgen-generated code to actually be readable, and include it in the
> > same crate) since there is a public specification rather than
> > "/usr/include is the spec".
> > Paolo
> > _______________________________________________
> > Rust-vmm mailing list
> > Rust-vmm at lists.opendev.org
> > http://lists.opendev.org/cgi-bin/mailman/listinfo/rust-vmm
> Rust-vmm mailing list
> Rust-vmm at lists.opendev.org
Dr. David Alan Gilbert / dgilbert at redhat.com / Manchester, UK
More information about the Rust-vmm