145 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
Jonathan Schwender
0529d215e7 Revert "Upgrade clap 3 to clap 4"
This reverts commit b734008c71f31a125797e799f420e1ad32f6b2f9.
2023-08-25 16:47:30 +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
Emilio Cobos Álvarez
2ac467796f
Update lockfile. 2023-05-29 17:31:51 +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
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
Emilio Cobos Álvarez
8604b2c0b7
v0.22.0 2022-04-19 11:29:52 +02:00
Emilio Cobos Álvarez
522759e92b Update various dependencies.
Closes #743
2022-03-27 17:37:09 +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
d4e508d6d1
Update MSRV to 1.54.0
Closes #740
2022-03-25 18:49:21 +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
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
1e6234f1ad General dependency + Cargo.toml format update. 2020-09-22 13:11:29 +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
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
Emilio Cobos Álvarez
f5d76c44c4
Release v0.12.1 2019-12-30 00:52:53 +01:00
Emilio Cobos Álvarez
f245881861 Miscellaneous minor dependency bumps. 2019-12-22 14:08:04 +01:00
Emilio Cobos Álvarez
38fda6b778
v0.12.0
* Added support for #[repr(align)] and #[repr(packed)] on structs and unions. https://github.com/eqrion/cbindgen/pull/431
 * Added support to generate copy-assignment operators for tagged enums. https://github.com/eqrion/cbindgen/pull/434
2019-12-16 13:29:53 +01:00
Emilio Cobos Álvarez
c8f94b5865
v0.11.1
* More binary operators and expressions are supported. https://github.com/eqrion/cbindgen/pull/425
 * More built-in bitflags operators. https://github.com/eqrion/cbindgen/pull/426
2019-12-08 22:15:34 +01:00
Emilio Cobos Álvarez
0355c3c031
v0.11.0
* Made rust char map to uint32_t. https://github.com/eqrion/cbindgen/pull/424
2019-12-04 00:05:11 +01:00
Emilio Cobos Álvarez
913b08d404
v0.10.1
* Improved error message for missing config file. https://github.com/eqrion/cbindgen/pull/422
 * Add missing header for char32_t. https://github.com/eqrion/cbindgen/pull/414
2019-12-03 00:49:05 +01:00
Emilio Cobos Álvarez
2609e96d61
v0.10.0 2019-11-19 17:08:56 +01:00