Previously the `depfile` option added a new private member to the
`Config` struct - a breaking change which many users complained about.
Making the field public, but hiding it from the documentation and
excluding it from `serde` reverts the breakage, while keeping the
depfile functionality.
* Fix swapping of `>>=` and `<<=` in constants.
* Add support for #[deprecated] (#860).
* Built-in support for bitflags 2.0.
* Support for "C-unwind" ABI.
* Generate bindings for non-public extern items if they are #[no_mangle].
I forgot forcing stable rustc for semver-checks in commit 67fea1a.
On nightly Rust it is possible for the rustdoc version
to be newer than what cargo semver checks supports.
Rename expectation files to contain only one dot.
This is needed for the Cython tests as of Cython 3.
The following script was used in a clean repository
to rename the files:
```sh
ls | sed -E -n 's/(.*)\.(both|tag)?((\..*)?\.(c|cpp|pyx))/mv "\1.\2\3" "\1_\2\3"/p' | sh
```
Cython 3.0 deprecated `IF` and `DEF`. Until this is fixed
allow warnings in our `Cython` tests.
Background: https://github.com/cython/cython/issues/4310
Note the warnings will become hard errors in the future.
Commit 667de09279c3d5f0524216fefa949e64cbd3bc1a
broke CI by adding rust-toolchain.toml, which changed
the default rust version to nightly.
Explicitly specify the rust version in CI to use the correct
toolchain.
the semver checks action and the release action are not
in the allow-list so replace them with their respective
cli counterparts.
These changes can only be tested by someone with permissions,
so the release part only releases a draft release for now.
When specifying `cbindgen` as a dependency via git, several 'skipping duplicate
package' warnings pop up regarding some of the test crates.
The warning seems to be spurious given that the test packages aren't needed when
depending on `cbindgen` (see https://github.com/rust-lang/cargo/issues/10752),
but while a fix is being considered for Cargo, this commit disambiguates the
duplicated package names by referring to their relative paths.
Previously config files next to an explicit input file
could not be picked up, since the `from_root_or_default`
functions assumes the input path is a directory.
This is the case for all other usages of the function, but
in this case we know the input is a file, so we determine
the parent directory and look for the config file in that
directory. There can't be a folder with the same name
as the input file, so it's not possible that we won't
pick up any files anymore that we previously did.
Add an option to output a depfile for outside build-systems to learn
the source file dependencies of the bindings.
This can be used by 3rd party build system integrations to only rerun
bindgen when necessary.
Testing is done via CMake integration tests, since CMake
is a 3rd party buildsystem which supports depfiles.
Since our MSRV is now Rust 1.54, we can rely on cargo setting `CARGO_BIN_EXE_cbindgen`
to the cbindgen path in integration tests.
This is more reliable than guessing the path, since cargo knows where it placed the bin.