Outline Rust bindings, obviously incomplete.
Attached is an example program showing how these bindings might be
used. The most obvious thing is all the explicit error checking that
the caller must do (same as in C). I'm not sure how natural that is,
but the alternatives seem to be lots of calls to either 'assert!' or
'panic!' functions.
To try it out:
(1) Apply the patch.
(2) Copy attached main.rc into rust/src/
(3) Build libguestfs.
(4) Do:
cd rust
cargo build
cargo run
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-top is 'top' for virtual machines. Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top