<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Apr 11, 2019 at 2:34 AM Paolo Bonzini <<a href="mailto:pbonzini@redhat.com">pbonzini@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 11/04/19 10:25, Samuel Ortiz wrote:<br>
> In several cases, we need to generate kernel bindings for some of our<br>
> crates (kvm, vhost, virtio), through rust-bindgen.<br>
> There's been discussions about whether we should have those bindings as<br>
> part of the related crate (e.g. a virtio/src/<a href="http://bindings.rs" rel="noreferrer" target="_blank">bindings.rs</a> module for the<br>
> virtio bindings) or as a separate crate (virtio-bindings,<br>
> vhost-bindings, kvm-bindings).<br>
> <br>
> We (Andreea and myself) believe it makes more sense to have them as<br>
> separate crates, and clearly distinguish generated bindings from actual<br>
> code consuming them. It generates a few more repos, but that's a minor<br>
> burden after all.<br>
> <br>
> Does anyone have strong opinions against that pattern?<br></blockquote><div><span class="gmail_default" style="font-family:arial,helvetica,sans-serif">That's how we did it for `kvm-sys` and `kvm` inside of crosvm. I think the separation makes a lot of sense.</span><span class="gmail_default" style="font-family:arial,helvetica,sans-serif"></span><span class="gmail_default" style="font-family:arial,helvetica,sans-serif"></span><span class="gmail_default" style="font-family:arial,helvetica,sans-serif"></span></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
No objections for kvm-bindings and vhost-bindings; however, for virtio<br>
and vhost-user I would just write everything by hand (or clean up<br>
bindgen-generated code to actually be readable, and include it in the<br>
same crate) since there is a public specification rather than<br>
"/usr/include is the spec".<br>
<br>
Paolo<br>
<br>
_______________________________________________<br>
Rust-vmm mailing list<br>
<a href="mailto:Rust-vmm@lists.opendev.org" target="_blank">Rust-vmm@lists.opendev.org</a><br>
<a href="http://lists.opendev.org/cgi-bin/mailman/listinfo/rust-vmm" rel="noreferrer" target="_blank">http://lists.opendev.org/cgi-bin/mailman/listinfo/rust-vmm</a><br>
</blockquote></div></div>