[Rust-VMM] VMM related bindings
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".
> Rust-vmm mailing list
> Rust-vmm at lists.opendev.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Rust-vmm