[Rust-VMM] VMM related bindings

Zach Reizner zachr at google.com
Thu Apr 11 17:37:42 UTC 2019


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.

>
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opendev.org/pipermail/rust-vmm/attachments/20190411/cb9e5b00/attachment-0001.html>


More information about the Rust-vmm mailing list