162 Commits

Author SHA1 Message Date
Jonathan Schwender
bb45e8d0b7 Update dependencies and bump MSRV to 1.70 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
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
35f2e44ef2 Update URLs 2023-09-09 00:54:28 +02:00
Mike Hommey
43af1ebe6e Handle bitflags bits method calls 2023-09-09 00:53:45 +02:00
Jonathan Schwender
0529d215e7 Revert "Upgrade clap 3 to clap 4"
This reverts commit b734008c71f31a125797e799f420e1ad32f6b2f9.
2023-08-25 16:47:30 +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
85bed13893 Change: this project requires proc-macro2 1.0.60+ 2023-08-25 15:49:03 +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
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
Emilio Cobos Álvarez
288073a7c1
Revert tempfile update to avoid tons of duplicate outdated deps. 2023-05-29 14:41:59 +02:00
Owen Phillips
44f8c4f722 Bump version. 2023-05-29 14:37:34 +02:00
Alex Touchet
55e24c5090 Replace Travis CI references and update some formatting 2023-03-08 16:08:13 +01:00
Emilio Cobos Álvarez
f43ccfc047
Bump version. 2022-06-09 22:35:48 +02:00
Emilio Cobos Álvarez
3d06ae1fc4
Version bump. 2022-06-07 21:34:55 +02:00
Emilio Cobos Álvarez
9855f90b65 Version bump. 2022-06-07 18:48:48 +02:00
Emilio Cobos Álvarez
b9a2209228 Version bump. 2022-06-07 16:19:40 +02:00
Emilio Cobos Álvarez
798cfab52b v0.23.0 2022-04-21 18:48:00 +02:00
Mike Hommey
a0ab62469a Update syn dependency to at least 1.0.88
While the Cargo.lock has 1.0.89, the current minimal version in Cargo.toml
is 1.0.3, which cannot parse modern Rust code. This leads to some
downstreams (*cough* Debian) inadvertently building cbindgen against
older versions of syn and the resulting cbindgen, even if it is the last
version, not being able to parse recent Rust code.

Bumping the version in Cargo.toml alleviates this to some extent. A
quick scan of the syn logs suggests 1.0.88 is the last version where
parsing support relevant to stable Rust syntax was added.
2022-04-21 13:13:40 +02:00
Emilio Cobos Álvarez
8604b2c0b7
v0.22.0 2022-04-19 11:29:52 +02:00
Emilio Cobos Álvarez
b3de1dc4b4
v0.21.0
* Update MSRV to 1.54.0
      * Update clap to 3.1.
      * Update heck to 0.4.0
      * unraw identifiers
      * Honor documentation_length in Cython.
      * Add documentation_style to with short and full options
      * Map RawFd to Int
      * Respect remove_underscores config when prefixing name to enum
2022-03-25 18:52:23 +01:00
messense
2f1202e8c5 Update clap to 3.1 2022-03-25 18:49:17 +01:00
messense
293fcc53ff Update heck to 0.4.0 2022-03-25 18:47:33 +01:00
Emilio Cobos Álvarez
41506d5aeb
v0.20.0
* Add Builder::with_using_namespaces (#688).
 * Ignore PhantomPinned (#695).
 * Simplify Pin<T> to T (#697).
 * Update --pretty=expanded to -Zunpretty=expanded (#706).
2021-07-29 14:29:15 +02:00
Emilio Cobos Álvarez
d9e490ce8b
v0.19.0
* Simplify types in generics (#663)
 * Use --profile=check for macro expansion (#671)
 * Use exported name to prefix enum variants (#672)
 * Fix path attribute handling in inline submodules (#679)
 * Fix a stack overflow with some recursive typedefs (#680)
2021-04-08 18:18:10 +02:00
Emilio Cobos Álvarez
a0dc1a1fcb
v0.18.0
* Simplify types in nested types such as pointed-to types and function
   signatures (#661).
2021-02-26 20:09:24 +01:00
Emilio Cobos Álvarez
8236c82679
v0.17.0
* Add with_parse_extra_bindings to builder. (#645)
 * Support NonZero and fix incorrect simplification of Option<ptr> into ptr. (#647)
 * Deal with name conflicts correctly in declaration type resolution. (#651)
 * Support pointers to ZSTs. (#656)
2021-02-01 13:57:43 +01:00
Emilio Cobos Álvarez
59f7b63280 Skip profiles test in package.
See https://github.com/rust-lang/cargo/issues/9017

Fixes #637.
2020-12-26 18:45:35 +01:00
Emilio Cobos Álvarez
1264d4c054
Minor metadata updates, rewrap README. 2020-12-21 00:24:24 +01:00
Emilio Cobos Álvarez
a00b4215a9
v0.16.0
* Remove artificial restriction on lifetime parameters on enums (#604)
 * Add an option for converting usize/isize into size_t/ptrdiff_t. (#606)
 * Allow controlling the cargo profile used for expansion. (#607)
 * Support wider range of expressions in enum discriminants (#614)
 * Support generation of Cython bindings (#590)
 * Fixed some issues with style=tag and recursive structs (#615)
 * Default C style to Both (as specified in docs) (#615)
 * Fix resolution of path dependencies from certain modules. (#629)
 * Support inlined definitions for tuple variants with a single field in C (#631)

Thanks to all the awesome contributors that contributed to this release.
2020-12-21 00:07:32 +01:00
Jordan Rose
0ba241498e
Allow controlling the Cargo profile used for macro expansion
If there's already a release build, it's better for cbindgen to reuse
the build artifacts from that to expand macros rather than starting
from scratch with a debug build. Controlled with

  --profile (debug|release)

as well as parse.expand.profile in cbindgen.toml, though hardcoding a
profile in a config file seems unlikely.
2020-10-27 11:35:10 +01:00
Emilio Cobos Álvarez
83b3be9f88
v0.15.0
* Allow customizing mangling of generic parameters in C (#575)
  * Box<T> simplifies to T* in C (4ce324c)
  * ManuallyDrop<T> and MaubeUninit<T> simplify to T in C, and are opaque in C++ (0076a17)
  * C++ supports a derive-ostream annotation to derive serialization of structs, unions and enums (#582)
  * Large character constants have been fixed on Windows (#586)
  * Constants are now generated for typedefs, etc (#589)
  * The `sort_by` configuration option has been made to work for constants (#587)
  * Default sort order is source order now (sort_by = "None"), and can be changed by the above option (#587)
2020-10-07 12:51:20 +02:00
Vadim Petrochenkov
f3d5a20363 Support sort_by for constants
Also support a global default for `sort_by` affecting both functions and constants.
2020-10-05 19:57:33 +02:00
Emilio Cobos Álvarez
e4da7d39a6
v0.14.6
Don't use matches!() to support older rustc versions.

Fixes #574
2020-09-21 20:56:12 +02:00
Emilio Cobos Álvarez
1e46e53ae2
v0.14.5 2020-09-19 16:24:32 +02:00
Emilio Cobos Álvarez
83cdbd897f
Release v.0.14.4 2020-08-20 18:42:17 +02:00
Emilio Cobos Álvarez
cc2876f709
Release 0.14.3 2020-06-24 17:32:15 +02:00
Emilio Cobos Álvarez
b6b88f8c30
Release v0.14.2 2020-05-01 00:49:15 +02:00
Vincent Tavernier
8139fbf3c7 Fix #418: Use heck for case conversion
All case conversion cases seem to be covered by this crate so this
greatly simplifies `rename.rs`.
2020-04-21 19:50:26 +02:00
Alan Somers
a9a893ee6c Fix dependencies spec and add CI testing with -Zminimal-versions 2020-04-10 18:30:29 +02:00
Emilio Cobos Álvarez
0761b9bbe4 Release 0.14.1
* Handle mangling pointers. (#508)
 * Unconditionally generate a return statement in partialeq implementations. (#509)
2020-04-10 16:38:41 +02:00
Emilio Cobos Álvarez
4a38a48937 Release 0.14.0
* Minor tweak at how [export.exclude] is handled to allow excluding generic
   instantiations in C mode. (#501)
 * Documented cpp_compat option. (#496)
 * Fixed a panic when parsing associated constants for a built-in type. (#494)
2020-04-04 23:32:40 +02:00
Emilio Cobos Álvarez
17d7aad7d0 Release v0.13.2 2020-03-21 03:31:26 +01:00
Emilio Cobos Álvarez
3b97f4ff6b
Release 0.13.1.
* Support #[cfg] on individual enum variants. (#469)
2020-02-09 15:48:11 +01:00
Emilio Cobos Álvarez
5e667158a1
Release v0.13.0
* Support 'swift_name' attributes on generated functions (#449)
 * Add [export.pre_body] to config (#452)
 * Handle new line in doc attribute (#454)
 * Add support for `Self` in tagged enums, structs and unions (#455, #455, #456)
 * Make sentinel variant respect regular config (#459)
 * Fix layout of tagged enums with size under some configurations (#463)
 * Add an option to allow configuring the order of function names in generated headers (#466)

Thanks to all the awesome contributors.
2020-01-31 01:54:19 +01:00
Emilio Cobos Álvarez
ac1a7d47e8
Release 0.12.2
* Fixed version detection with lockfile v2. https://github.com/eqrion/cbindgen/pull/446
* Added support for export_name on functions. https://github.com/eqrion/cbindgen/pull/447
2020-01-10 14:11:28 +01:00