152 Commits

Author SHA1 Message Date
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
Emilio Cobos Álvarez
f5d76c44c4
Release v0.12.1 2019-12-30 00:52:53 +01:00
Emilio Cobos Álvarez
16fe3ec142 Update to rust 2018. 2019-12-22 14:08:33 +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
Emilio Cobos Álvarez
8e4db4c17f
Release 0.9.1.
* Various improvements to comment output. https://github.com/eqrion/cbindgen/pull/370 / https://github.com/eqrion/cbindgen/pull/375.
 * Fixed expand when ran from build.rs. https://github.com/eqrion/cbindgen/pull/371
 * More debugging output for expansion. https://github.com/eqrion/cbindgen/pull/383
 * New option to add a default private constructor in C++ tagged enums. https://github.com/eqrion/cbindgen/pull/377
 * Syn and related dependencies updated to 1.0. https://github.com/eqrion/cbindgen/pull/379
2019-08-25 19:45:15 +02:00
Bastien Orivel
25e51f6e3b Update syn related dependencies to 1.0 2019-08-19 09:28:03 +02:00
Emilio Cobos Álvarez
e19526e00b
Release 0.9.0
* Support to generate C headers with C++ compatibility. https://github.com/eqrion/cbindgen/pull/349
 * Fix include guard generation when no_includes is set. https://github.com/eqrion/cbindgen/pull/352
 * Fix crate parsing order so that types from the binding crate are preferred in presence of conflicting names. https://github.com/eqrion/cbindgen/pull/355
 * Add extra_bindings option to generate bindings for dependencies. https://github.com/eqrion/cbindgen/pull/362
 * Clap dependency is optional now so it's feasible to avoid building it if cbindgen is used as a library. https://github.com/eqrion/cbindgen/pull/363
2019-06-26 15:18:17 +02:00