1083 Commits

Author SHA1 Message Date
Jonathan Schwender
bb45e8d0b7 Update dependencies and bump MSRV to 1.70 2024-02-26 17:16:12 +01:00
Jonathan Schwender
e32090e334 Fix clippy warning 2024-02-26 17:16:12 +01:00
Emilio Cobos Álvarez
61d4112374 Fix clap 4 update. 2024-02-26 17:16:12 +01:00
boxdot
d49048573c Upgrade clap 3 to clap 4
This also removes the dependency on the unmaintained crate atty.

Closes #828
2024-02-26 17:16:12 +01:00
Jonathan Schwender
c9c90bf661 Fix ..Default::default() for struct Config
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.
2024-02-06 19:06:52 +01:00
Aidan Hobson Sayers
6bfc217618 Add docs for no-export 2023-11-11 19:19:10 +01:00
Emilio Cobos Álvarez
703b53c06f
v0.26.0
* 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].
2023-09-13 11:14:28 +02:00
Alex Touchet
56f0febc9b Update MSRV in Readme 2023-09-12 10:29:19 +02:00
Mike Hommey
9b4a14958e Add support for out-of-line bitfields declarations 2023-09-12 10:28:58 +02:00
Alex Touchet
35f2e44ef2 Update URLs 2023-09-09 00:54:28 +02:00
Thibaut Lorrain
85eb0f4436 Bump clippy msrv to 1.64
the msrv was bumped in in the Cargo.toml #847 but not in clippy.toml,
clippy was complaining at startup and defaulting to 1.57
2023-09-09 00:53:59 +02:00
Mike Hommey
43af1ebe6e Handle bitflags bits method calls 2023-09-09 00:53:45 +02:00
Emilio Cobos Álvarez
f72e447156
CHANGES: Note #[deprecated] support. 2023-09-04 20:18:44 +02:00
Emilio Cobos Álvarez
1473070230
utilities: annotation: Clean-up deprecated parsing and getter. 2023-09-04 20:18:44 +02:00
sevenc-nanashi
0fb5d07ae4
Add support for #[deprecated].
Closes #875.
Closes #860.
Closes #408.
2023-09-04 20:18:44 +02:00
Jannis Ruh
d8355da466
Support "C-unwind" ABI
Closes #864
2023-09-04 20:12:55 +02:00
Jonathan Schwender
db6ccdd863 Fix cargo semver-checks rust version
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.
2023-09-04 19:37:56 +02:00
Jonathan Schwender
e7613e5701 CI: Use Cython 3.0 2023-09-04 19:37:45 +02:00
Jonathan Schwender
51a981cefc Rename expectations files
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
```
2023-09-04 19:37:45 +02:00
Jonathan Schwender
ff888019fe Allow Warnings in Cython tests
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.
2023-09-04 19:37:45 +02:00
Jonathan Schwender
23f7bbcf9f Fix most Python tests with Cython 3.0
Since Cython 3.0 using dots appart from the extension is
a hard error. See issue: https://github.com/cython/cython/issues/2686
2023-09-04 19:37:45 +02:00
Marin Veršić
5f235ec199
generate bindings for non-public extern items
Signed-off-by: Marin Veršić <marin.versic101@gmail.com>
2023-08-25 11:11:16 -04:00
boxdot
acb1b8d89e fix: verbose logging was always info 2023-08-25 16:57:33 +02:00
Jonathan Schwender
aeea9c67ff
Fix swapping of >>= and <<= in constants
This should't change behavior in practice since using these in constants
doesn't seem possible.

Closes #850
2023-08-25 10:55:53 -04:00
Jonathan Schwender
dd9a550152 Fix minimal Rust version in CI
The minimum rust version was bumped, so we need
to install the appropriate version in CI.
2023-08-25 16:47:30 +02:00
Jonathan Schwender
0529d215e7 Revert "Upgrade clap 3 to clap 4"
This reverts commit b734008c71f31a125797e799f420e1ad32f6b2f9.
2023-08-25 16:47:30 +02:00
Jonathan Schwender
289a31ba45 Fix clippy warning
Rust 1.72 added a new warning, which should have been ignored
by clippy, since clippy.toml is still st to 1.57.0
2023-08-25 16:47:30 +02:00
Jonathan Schwender
67fea1a1a2 Fix CI
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.
2023-08-25 16:47:30 +02:00
Jonathan Schwender
80526e72f9 Update changelog for v0.25.0 2023-08-25 15:50:52 +02:00
Jonathan Schwender
1e2ffd4414 CI: Replace forbidden actions with cli code
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.
2023-08-25 15:50:52 +02:00
Jonathan Schwender
f61946b979 CI: Add semver checks to CI deploy job
This will fail creating a new github release, if the semver
action fails.
This would have caught #841.
2023-08-25 15:50:52 +02:00
boxdot
b61aa2c330 msrv 1.64 2023-08-25 15:50:04 +02:00
boxdot
b734008c71 Upgrade clap 3 to clap 4
This also removes the dependency on the unmaintained crate atty.

Closes #828
2023-08-25 15:50:04 +02:00
sevenc-nanashi
667de09279 Add: Add rust-toolchain.toml 2023-08-25 15:49:03 +02:00
sevenc-nanashi
1b7aab6a87 Add: Cython 3 fails test 2023-08-25 15:49:03 +02:00
sevenc-nanashi
85bed13893 Change: this project requires proc-macro2 1.0.60+ 2023-08-25 15:49:03 +02:00
Emilio Cobos Álvarez
0b43f0bc6c ci: Switch back to dtolnay/rust-toolchain action. 2023-06-07 17:39:59 +02:00
Emilio Cobos Álvarez
e9e88b0ab0
Yank last version and bump for now (unpublished) 2023-06-01 10:23:21 +02:00
Jonathan Schwender
cbd3541614 Bump version 2023-05-31 12:32:35 +02:00
Jonathan Schwender
927ecd95bf Update documented MSRV 2023-05-31 12:32:35 +02:00
Jonathan Schwender
166bcf307a Update Changelog 2023-05-31 12:32:35 +02:00
Ian Hobson
6165bbf021 Avoid 'duplicate package' warnings when depending on cbindgen via git
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.
2023-05-31 12:31:39 +02:00
Sjors Holtrop
c8546ad42d Parse ... as a VaList 2023-05-29 21:33:25 +02:00
Jonathan Schwender
5778380ba1 Look for config files next to input files
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.
2023-05-29 19:55:46 +02:00
Jonathan Schwender
25132a3690 Add --depfile option
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.
2023-05-29 18:56:53 +02:00
Jonathan Schwender
cb42a00ab6 Improve cbindgen detection in tests
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.
2023-05-29 18:56:53 +02:00
Emilio Cobos Álvarez
ea6e886f7b ci: Try to fix github actions.
Fixes #836
2023-05-29 18:10:25 +02:00
Emilio Cobos Álvarez
2ac467796f
Update lockfile. 2023-05-29 17:31:51 +02:00
Emilio Cobos Álvarez
3680e4d539
Bump version. 2023-05-29 17:15:36 +02:00
Emilio Cobos Álvarez
f97e4c2945
Don't enforce a particular tempfile version for people depending on cbindgen via crates.io / git. 2023-05-29 17:13:09 +02:00