[Libguestfs] The Outline of Google Summer of Code

Hiroyuki Katsura hiroyuki.katsura.0513 at gmail.com
Thu May 23 09:27:02 UTC 2019


Hi, I'm Hiroyuki Katsura. I will contribute to libguestfs as a Google
Summer of Code project. I'll start to develop from next week.

I'm going to work on the project "Create Rust bindings for libguestfs."

Project summary is available here.
https://summerofcode.withgoogle.com/projects/#6730007286644736

Now, I'll show you the detail of the project. This is the reprint of the
proposal(The proposal is not public).


## The detailed description of each part
1. Implement minimal bindings and build it correctly.
There are some functions to be implemented manually. Typical examples of
this type of functions are the ones which create or close libguestfs
handles.

2. Handle errors.
The best practice of handling errors varies between languages. For example,
error handling is implemented with exceptions in OCaml, while in Lua there
is an error stack which is easily pop the last error from it. In order to
make bindings easier to use, error handling should be implemented in the
way following the custom of each language.
In Rust, it is preferable to use Result and error enum, so I adopt this
style.

3. Implement the generator of Actions(APIs) and Structs.
 This is the main part of this project. This can be achieved by creating
the "generator" described above.

4. Implement handlers related to Events.
Events are a tricky part of the bindings. Users can receive some events
like LaunchDone, Progress, SubprocessQuit, etc. from libguestfs by
registering a callback.
Although not all the languages have this functionality, I will implement
this to the Rust bindings.

5. Add documents and examples.
 In order to make the bindings easier to use for developers, it is
necessary to add documents and examples of the bindings.

6. Implement tests.
Tests are essential to keep the bindings working in the future and to
prevent it from being degraded when someone adds new features to the
bindings or APIs. In libguestfs, when you add a new binding, it is
preferred to add the same tests as the ones implemented in OCaml or Perl
bindings. This means that I will implement 0XX tests defined in tests of
OCaml or Perl bindings.

-------------------------------------------------------------------------------

I am planning to send the patch 3 times: after implementing the generator
of Actions(APIs) and Structs, after implementing the events and
miscellaneous, after completion of the project.

Regards,
Hiroyuki

--------------------------
Hiroyuki Katsura
Department of Information Science
Science
University of Tokyo.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20190523/b2b76e3e/attachment.htm>


More information about the Libguestfs mailing list