Re: [libvirt] libvirt binding for Rust

2017-06-07 Thread Sahid Orentino Ferdjaoui
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


--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] libvirt binding for Rust

2017-06-07 Thread Daniel P. Berrange
On Tue, Jun 06, 2017 at 10:31:33PM +0100, Daniel P. Berrange 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
> > 
> > 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.
> 
> Given the wide range of other language bindings we are already hosting,
> I'd be happy to see the Rust binding added there too.

I forgot to say, please send me your ssh public key off list, and assuming
no one objects, I'll set up the git hosting for this.

Regards,
Daniel
-- 
|: https://berrange.com  -o-https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o-https://fstop138.berrange.com :|
|: https://entangle-photo.org-o-https://www.instagram.com/dberrange :|

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] libvirt binding for Rust

2017-06-07 Thread Martin Kletzander

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.


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


signature.asc
Description: Digital signature
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] libvirt binding for Rust

2017-06-06 Thread Daniel P. Berrange
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
> 
> 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.

Given the wide range of other language bindings we are already hosting,
I'd be happy to see the Rust binding added there too.

Regards,
Daniel
-- 
|: https://berrange.com  -o-https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o-https://fstop138.berrange.com :|
|: https://entangle-photo.org-o-https://www.instagram.com/dberrange :|

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list