Commit Graph

3 Commits

Author SHA1 Message Date
Colin Walters
0f325b3490 Makefile.bindings: Also generate pure rust/cxx.h
This is necessary in order to use `rust::` in our header files
that are also used by bindings.
2021-01-27 19:36:34 -05:00
Colin Walters
15811eca4f Makefile.bindings: Use content-based change detection
We've had a problem for a long time that e.g. `rpmostree-rust.h`
didn't have dependencies on the relevant Rust sources, so changing
it required `rm -f rpmostree-rust && make` which is very confusing.

Improve things here for both it and cxx.rs so that we use
content-based change detection (this is a default in more modern
build systems).  This way e.g. `touch Cargo.toml && make` won't
implicitly result in rebuilding all of the C/C++ side.
2021-01-04 13:17:35 +01:00
Colin Walters
08c414f897 Rework bindgen/cxx.rs usage and CI build
cxx.rs (aka cxxbridge) and cbindgen are
both generating source code.  Since the last release
we've introduced the former, and we need to ensure
that the generated cxx.rs source ends up in release tarballs
the same way as the cbindgen code.

Rationalize and clean up the binding infrastructure.
Drop support for the vendored cbindgen which we
weren't actually using:
Closes: https://github.com/coreos/rpm-ostree/issues/2392

Move the cxx-rs and cbindgen bits into the same place,
and update our CoreOS CI build to use a separate `Makefile.bindings`
that just generates the code, so our CI still "works like"
a main Koji RPM build.
2021-01-04 13:17:35 +01:00