I am trying to publish a
*-sys crate for a C-library that is usually statically linked. The crate uses
bindgen to generate the Rust bindings. My idea was to fetch the library as git submodule and have build instructions for it in
build.rs This works nicely, I can even fetch my
*-sys crate as cargo dependency using the
git dependency specification.
The repo is automatically cloned, the submodule for the C-library is fetched, the C-library is build and so on, everything fine.
Until I try to
cargo publish the crate. Then the package verification fails, because the build added the submodule to the source file.
How is this supposed to work?