[Libguestfs] [PATCH] Add Rust bindings
Martin Kletzander
mkletzan at redhat.com
Mon Jul 8 08:49:55 UTC 2019
On Mon, Jul 08, 2019 at 10:10:10AM +0200, Pino Toscano wrote:
>On Saturday, 6 July 2019 13:03:24 CEST Martin Kletzander wrote:
>> Just one thing, the Cargo.toml includes a version under which the crate would be
>> published. I presume the version would be the same as the one of the project
>> itself, i.e. when releasing libguestfs-x.y.z, we publish guestfs-rs-x.y.z to
>> crates.io.
>
>Speaking of naming: it seems like libraries that interface/wrap a
>foreign C/C++/etc library are usually called foo-sys -- so should our
>binding be named guestfs-sys?
>
So you've seen my RFC? =)
Just to guestfs-sys would be a crate that does only two things:
1) exposes the C functions using `extern`
2) links to the library
And then another crate (e.g. guestfs) would expose the higher-level, safe,
hopefully idiomatic API. More information (reasoning etc.) see:
https://doc.rust-lang.org/cargo/reference/build-scripts.html#a-sys-packages
Martin
>--
>Pino Toscano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20190708/d30f280d/attachment.sig>
More information about the Libguestfs
mailing list