<div dir="ltr">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.<br><br>I'm going to work on the project "Create Rust bindings for libguestfs." <br><br>Project summary is available here.<br><a href="https://summerofcode.withgoogle.com/projects/#6730007286644736">https://summerofcode.withgoogle.com/projects/#6730007286644736</a><br><br>Now, I'll show you the detail of the project. This is the reprint of the proposal(The proposal is not public).<br><br><br>## The detailed description of each part<br>1. Implement minimal bindings and build it correctly.<br>There are some functions to be implemented manually. Typical examples of this type of functions are the ones which create or close libguestfs handles. <br><br>2. Handle errors.<br>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.<br>In Rust, it is preferable to use Result and error enum, so I adopt this style.<br><br>3. Implement the generator of Actions(APIs) and Structs.<br> This is the main part of this project. This can be achieved by creating the "generator" described above. <br><br>4. Implement handlers related to Events.<br>Events are a tricky part of the bindings. Users can receive some events like LaunchDone, Progress, SubprocessQuit, etc. from libguestfs by registering a callback. <br>Although not all the languages have this functionality, I will implement this to the Rust bindings.<br><br>5. Add documents and examples.<br> In order to make the bindings easier to use for developers, it is necessary to add documents and examples of the bindings. <br><br>6. Implement tests.<br>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. <br><br>-------------------------------------------------------------------------------<br><br>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.<br><div><br></div><div>Regards,</div><div>Hiroyuki</div><div><br></div><div>--------------------------</div><div>Hiroyuki Katsura</div><div>Department of Information Science</div><div>Science</div><div>University of Tokyo.<br class="gmail-Apple-interchange-newline"></div><div><br></div><div><br></div></div>