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