85 Commits

Author SHA1 Message Date
Justin W Smith
ae6817256a
Release 0.64.0 Request (#2399)
Prepare 0.64.0 Release

---------

Co-authored-by: Christian Poveda <christian.poveda@ferrous-systems.com>
2023-02-07 10:36:50 -05:00
Christian Poveda Ruiz
62b48c5670
Fix wrong entry in changelog (#2404) 2023-02-06 15:40:30 -05:00
Dan Dumont
bca47cd9c2
Implement cli option for custom derive (#2328)
* custom derives after DeriveInfo

* Introduce `TypeKind` instead of `CompKind`

* Add tests

* Emit CLI flags for callbacks

* update changelog

* run rustfmt

* fix tests

* fix features

Co-authored-by: Christian Poveda <christian.poveda@ferrous-systems.com>
2023-01-20 15:12:42 -05:00
Christian Poveda Ruiz
190a017a10
Migrate CLI argument parse to the clap derive API (#2390)
* Migrate CLI argument parsing to the derive API

* Fix docs

* Fix tests

* Use `override_usage`

* Update changelog
2023-01-18 12:38:19 -05:00
Christian Poveda Ruiz
758ec87c95
Remove any references to master (#2391) 2023-01-18 12:23:13 -05:00
Andrew Walbran
ed2d06eae3
Update to clap 4. (#2380)
* Update to clap 4.

* Bump MSRV to minimum required by clap 4.

* Mention clap update in CHANGELOG.
2023-01-12 15:37:48 -05:00
Emilio Cobos Álvarez
5875949e8e
codegen: Look through typedefs to detect void return type. (#2379)
* codegen: Look through typedefs to detect void return type.

And reuse a bit more code.

Should fix #2377, but needs a test (can't run tests atm).

* Add tests

* Run rustfmt

* Update changelog

Co-authored-by: Christian Poveda <christian.poveda@ferrous-systems.com>
2023-01-06 13:07:28 -05:00
Christian Poveda Ruiz
87b535c3c1
Extend documentation about deprecation of wildcard patterns (#2374) 2022-12-15 16:02:28 -05:00
Christian Poveda Ruiz
8582fb383d
Bump clang-sys version (#2368)
* Bump `clang-sys` version

* add libtinfo5 package to fix CI
2022-12-07 12:27:01 +01:00
Christian Poveda Ruiz
a9d4198531
Document callback changes and avoid static lifetime (#2366) 2022-11-28 14:01:25 -05:00
Christian Poveda Ruiz
690feb398b
Update CHANGELOG.md (#2365) 2022-11-28 09:49:51 -05:00
Christian Poveda Ruiz
d828f3f7ad
Release v0.63.0 (#2357) 2022-11-22 12:44:10 -05:00
Christian Poveda Ruiz
7e4174990c
Deprecate Rust targets lower or equal than 1.30 (#2356) 2022-11-22 12:31:14 -05:00
Christian Poveda Ruiz
046d6f9eea
Add --wrap-unsafe-ops option (#2354)
This reverts commit e8ffb42ab66405ac56d04494a30e54b584f2d4dd and adds a new `--wrap-unsafe-ops` option as a workaround.
2022-11-22 11:41:32 -05:00
Christian Poveda Ruiz
f160d11d56
Add ParseCallbacks::process_comment (#2347)
This method can be used to process comments and replace them with whatever the user wants.
2022-11-22 11:25:13 -05:00
Christian Poveda Ruiz
34f0bacb7e
Introduce DeriveInfo (#2355)
This PR introduces a new non-exhaustive `struct` called `DeriveInfo` to be used as the sole argument of `ParseCallbacks::add_derives` with the purpose of being able to extend the information passed to this method in a backwards-compatible manner, meaning that adding new fields to `DeriveInfo` won't be a breaking change when releasing a new version.
2022-11-21 10:38:42 -05:00
Christian Poveda Ruiz
8fe230830f
Remove deprecated methods (#2346) 2022-11-17 10:02:29 -05:00
Emilio Cobos Álvarez
c09bd2f5b5
v0.62.0 2022-11-17 04:36:23 +01:00
Christian Poveda Ruiz
e8ffb42ab6
Wrap unsafe function's bodies in unsafe blocks (#2266)
This guarantees that bindings generated by `bindgen` compile even if the `unsafe_op_in_unsafe_fn` lint is denied.
2022-11-04 15:22:49 -05:00
Christian Poveda Ruiz
7c26cd218d
Add support for the "C-unwind" ABI (#2334)
* Add support for the `"C-unwind"` ABI

This allows using `"C-unwind"` as an ABI override if the rust target is
nightly.
2022-11-04 10:19:28 -05:00
Christian Poveda Ruiz
9c32b46048
Add the --override-abi option (#2329)
* Add the `--override-abi` option.

This option can be used from the CLI with the <abi>:<regex> syntax and
it overrides the ABI of a function if it matches <regex>.

Fixes #2257
2022-11-02 15:30:34 -05:00
Christian Poveda Ruiz
a673a6bc9b
Allow callback composition (#2330)
* Allow callback composition

Store all the callbacks added to the builder in a `Vec` so bindgen
invokes each one of them in a last-to-first manner.
2022-11-02 13:46:22 -05:00
Christian Poveda Ruiz
da548d20f4
Avoid suppressing panic messages (#2323)
* print `PanicInfo` using hook
* update changelog
2022-10-24 11:52:46 -05:00
Adam Gausmann
6086694d40
Sanitize RegexSet input so alternation is properly handled (#1756)
* tests: Avoid using globs as regexes

* Sanitize regex set input to properly handle alternation

* Add test case for alternates/anchors interaction

* emit warning if wildcard pattern is used

* update changelog and bump versions

Co-authored-by: Darren Kulp <darren@kulp.ch>
Co-authored-by: Christian Poveda <christian.poveda@ferrous-systems.com>
2022-10-24 10:39:52 -05:00
Emilio Cobos Álvarez
4f9b970f95 v0.61.0 2022-10-16 21:44:20 +02:00
Emilio Cobos Álvarez
c424e03415 Add a few missing changelog entries. 2022-10-16 21:29:41 +02:00
Christian Poveda
46cd3af9c6
Implement Clone for Builder
This is done by moving all the remaining `Builder` state into
`BindgenOptions` so any internal logic that affects `Builder` state only
runs once the builder is consumed by `Builder::generate`:

- move `input_headers` to `BindgenOptions`.
- move `input_header_contents` to `BindgenOptions`.
- derive `Clone` for `Builder`.
2022-10-07 14:10:24 -05:00
Christian Poveda
c8d569930e
update CHANGELOG.md (#2298) 2022-10-07 01:30:25 +02:00
Amanjeev Sethi
6dfc3e70df
Sorting the output semantically (#2254)
Generated code needs some sorting in a way that is
semantically appealing. The request[1] asks for basic
sorting like "types are declared first, then all structs,
then all consts, then all function signatures, etc.

[1] https://github.com/rust-lang/rust-bindgen/issues/1743

Signed-off-by: Amanjeev Sethi <aj@amanjeev.com>
Co-authored-by: Christian Poveda <christian.poveda@ferrous-systems.com>
Co-authored-by: Darren Kulp <darren@kulp.ch>
2022-08-25 00:45:03 +02:00
Darren Kulp
105b9422cd Mark update to clap in CHANGELOG 2022-07-21 21:11:18 -04:00
Emilio Cobos Álvarez
9ca5f856a3 Bump version. 2022-06-06 13:22:48 +02:00
Emilio Cobos Álvarez
3551811340
v0.60.0
Closes #2209
2022-06-05 20:38:24 +02:00
Sebastian Imlay
6a169f2134 Fix macOS test expectations
* Updated tests/expectations/Cargo.toml to use 2018 rust.
* Added Debug and Copy to objective-c structs.
* Fixed lifetimes in objective-c trait templates.
* Fixed imports for objective-c expectations tests.
2022-03-15 03:38:57 +01:00
Anthony Ramine
82462a37a1 Bump cexpr to 0.6 2021-10-13 12:30:30 +02:00
Emilio Cobos Álvarez
9a9438f3d6 v0.59.1 2021-07-26 00:25:03 +02:00
Emilio Cobos Álvarez
67140077f6
v0.59.0 2021-07-20 12:20:14 +02:00
Emilio Cobos Álvarez
696455d1c1 v0.58.1 2021-04-06 11:19:31 +02:00
Corey Farwell
89baa2cf04 Fix 0.58.0 release date 2021-04-05 18:35:26 +02:00
Corey Farwell
b5e6eb1cb2 Reference aarch64 issue in the changelog. 2021-04-03 13:19:09 +02:00
Emilio Cobos Álvarez
d7ba7d1dcb
v0.58.0 2021-04-03 13:16:10 +02:00
Marcel Hlopko
0e25962c4e Rename whitelist -> allowlist and blacklist -> blocklist
For the commandline arguments I added undocumented aliases to old flags,
to stay backwards compatible.
2021-02-18 17:25:13 +01:00
Corey Farwell
04c653b665 Fix heading level 2021-02-08 11:59:47 +01:00
Emilio Cobos Álvarez
43a05656ae
Fix changelog (run doctoc, plus we're in 2021 already) 2021-02-01 14:08:28 +01:00
Emilio Cobos Álvarez
5ca2fc7a02 v0.57.0 2021-02-01 14:06:00 +01:00
Emilio Cobos Álvarez
11ae35089e
v0.56.0 2020-11-26 11:36:09 +01:00
Emilio Cobos Álvarez
727dc6308b
Document various changes that will get into the next release. 2020-11-13 20:20:06 +01:00
Emilio Cobos Álvarez
faeaba6ac8
Document 0.47 dot-release. 2020-11-13 19:45:45 +01:00
Sebastian Imlay
27b0261569 Updated CHANGELOG.md 2020-09-16 12:26:24 +02:00
Emilio Cobos Álvarez
d492ac4ae1 v0.55.1 2020-08-25 00:38:57 +02:00
Emilio Cobos Álvarez
0996486f09 Release v0.55.0 2020-08-24 11:58:44 +02:00