Re: [GSoC] Introduction - nodejs bindings

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

 



On Wed, May 02, 2018 at 02:41:59PM +0100, Ramy Elkest wrote:
> Hi all,
> 
> As a quick introduction, I'm Ramy Elkest, a student at Georgia Tech and
> one of the lucky ones selected by libvirt for this year's Google Summer
> of Code.
> 
> During the next months I'll be working with my mentors Martin Kletzander
> and Erik Skultety to introduce nodejs to libvirt's family of bindings.
> 
> In short, the aim is to generate the nodejs bindings from the XMLs (as we
> do for python).
> 
> On a very high level my current approach is as follows:
> - Re-use libvirt-python's generator (mainly the parser) possibly re-written
>     in node (TBD)

Personally I would put focus on outputting the Node code,
rather than porting the generator from Python to Node,
since the former is more immediately useful to developers.
By all means port the generator to Node later at the end
once the bindings are succesfully being generated.

> - Draw from existing projects (eg. node-libvirt) to generate preliminary
>     templates
> 
> There are a few things to look into before jumping in:
> - Code generation framework (or lack of)
> - Node Abstractions for Node (NAN) vs. Node-API (N-API)
> 
> If you have preliminary thoughts / background info about any of the above,
> I'd love to hear it. I'm usually around on irc, "relkest".

Even if you try to auto-generate APIs, the libvirt API complexity and
variance is such that you'll inevitably end up manually writing a good
number of API bindings, as we've done in Python. A key thing to thus
understand is what level of coverge you have of libvirt APIs. So I
would suggest writing a test that analyses the combination of the
manual code and autogenerated code, to validate that together they have
100% API coverage.

We did this in the python binding with sanitytest.py or in the Go
binding with api_test.go or Perl with t/030-api-coverage.t if you
want insipiration.

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@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux