[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] libvirt binding for Rust



On Wed, Jun 07, 2017 at 11:14:11AM +0200, Martin Kletzander wrote:
> On Tue, Jun 06, 2017 at 12:19:21PM +0200, Sahid Orentino Ferdjaoui wrote:
> > Hello,
> > 
> > I started a work on a libvirt binding for Rust [0]. Not all of the API
> > is implemeted but I think it's now in a usable state.
> > 
> >  https://docs.rs/crate/virt
> >  https://github.com/sahid/libvirt-rs
> > 
> > The code is licensed under LGPL-2.1, it's tested by a CI running
> > libvirt 1.2.0, 2.5.0, 3.3.0. There are unit tests, integration tests
> > and some examples to exercise the code (some parts are still not
> > covered) I also have checked the code with valgrind to avoid any
> > memory leaks.
> > 
> >  https://travis-ci.org/sahid/libvirt-rs
> > 
> 
> This is nice, I am thinking of trying to add a module support for
> modules written in Rust, but that's just a fun project.
> 
> Anyway, if I may give you an advice, it would be way nicer if some of
> the bindings were automatically generated.  Libvirt provides all the
> infomartion necessary in libvirt{,-qemu-lxc}.xml files for you to be
> able to do this.  We already do this for the python bindings, for
> example.  That way they automatically support trivial function additions
> in newer libvirt versions.

It's certainly something we can do with a tool like [0], and you can
see an example of the API extracted here [1]. But the point of that
work is to provide for users a way to avoid to interact with unsafe
code.

[0] https://github.com/servo/rust-bindgen
[1] https://docs.rs/libvirt-sys/1.2.18/libvirt_sys/

> > Do you think that we can consider it ready to be hosted by libvirt.org
> > GIT server ? That could help to get new contributors also interested
> > by Rust and improve the code and coverage of the API.
> > 
> > Thanks,
> > s.
> > 
> > --
> > libvir-list mailing list
> > libvir-list redhat com
> > https://www.redhat.com/mailman/listinfo/libvir-list



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]