So what do I think about the patch series as a whole ... (in
particular, the patches I didn't add Reviewed-by tags to).
It would be much nicer IMHO if we didn't have to define callback
lifetimes in this way, since they were not intended to be classified
into async_kind / cblifetime / cbcount, and this might limit our
options for new ABIs in future.
I see two ways to go here:
(1) (Easier for now, problems in future) Rename async_kind, cblifetime
and cbcount as rust_async_kind, rust_cblifetime, rust_cbcount, which
would in some sense limit the scope of getting these right to the Rust
bindings.
This defers the pain til later (maybe never, if we never added an ABI
which didn't satisfy these constraints).
(2) (Harder for now, no problems in future) Use a reference count in
the Rust bindings, which is how the other bindings work. It makes the
Rust bindings more awkward to use, but does more accurately express
the actual intention of the API.
Discuss ...
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming and virtualization blog:
http://rwmj.wordpress.com
libguestfs lets you edit virtual machines. Supports shell scripting,
bindings from many languages.
http://libguestfs.org