120 Commits

Author SHA1 Message Date
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
Elichai Turkel
0edaeb5ea2
Removed redundant serde-derive and disabled default features in serde 2019-06-25 08:42:56 -04:00
Elichai Turkel
6748b78c0b
Made clap optional 2019-06-25 08:42:16 -04:00
Bastien Orivel
bda41f95f4 Update toml to 0.5 2019-05-21 23:56:16 +02:00
Emilio Cobos Álvarez
23a991a5b2 Release 0.8.7
* Require C++11 to run the test-suite (#341, test-only)
 * Improve mangling error message (#340)
 * Add the ability to automatically derive copy-constructors for tagged enums (#339)
 * Use placement new for constructing in tagged unions' helper methods (#333)
2019-05-12 02:29:53 +02:00
Ryan Hunt
5ec5a82d26 Release 0.8.6
* Fixed a panic when missing a lock file
2019-05-06 12:42:34 -05:00
Ryan Hunt
0567052a82 Release 0.8.5
* Improved support for Rust 2018 modules
* Add possibility to autogenerate tagged union destructors
2019-05-03 13:42:06 -05:00
Ryan Hunt
46aed0802a Release 0.8.4
* Support for package renaming in Cargo.toml
* Improved error messages for |cargo metadata| failures
* Replaced 'test.py' harness with |cargo test|
* Char constants will now be escaped properly
* Visibility of constants will now be respected
* Added a C99 doc comment style
2019-04-29 15:09:44 -05:00
Ryan Hunt
ba02367253 Release 0.8.3 2019-03-30 11:50:13 -05:00
Ryan Hunt
60d8234bf3 Release 0.8.2
* Improvements to bitflags parsing
2019-03-06 14:15:39 -06:00
Ryan Hunt
9701643284 Release 0.8.1
* Support for manual parsing and expanding of bitflags macros
 * Support for optional tagged enum casts with asserts
2019-03-05 11:22:41 -06:00
Emilio Cobos Álvarez
38e3f886e2 parser: Special-case bitflags macro.
Fixes #100.

I want to add some more ergonomic improvements when in C++, but that's better in
another PR.
2019-02-23 15:11:17 -08:00
Ryan Hunt
e712cc42c7 Release 0.8.0
* support for 'includes' without default includes
* removed dependency on ancient serde_derive!
2019-02-13 21:11:41 -06:00
Mrmaxmeier
82804bb862 Unpin serde_derive
This bumps the minimal supported `rustc` version to 1.32.
2019-02-11 19:27:37 -06:00
Ryan Hunt
fbe9eff351 Release 0.7.1
* Fix for crash when unwrapping unsupported type with associated constants
2019-01-25 18:55:32 -06:00
Ryan Hunt
e1bad0e708 Release 0.7.0
* support for libc::ssize_t
* fixed some warnings on nightly
* fix for transparent associated constants
* switched more API's to use AsRef<Path>
* impl std::error::Error for cbindgen::Error
* now support putting user-defined content in item bodies
2019-01-24 12:50:08 -06:00
Ryan Hunt
44e9b2112a Release 0.6.8
* ptrdiff_t is now a recognized primitive type
* named function type arguments are now propagated
* fixes for struct literals in constants
* reserved C/C++ keywords are now escaped automatically
* negative enum discriminants are now supported
* fix for prefixing and formatting variant names
* fix for snake_case formatter
* syn update
* doxygen style comments are now output by default
* VaList is now a recognized primitive type
* fix for comment processing
* constant is propagated into array types
* references are now supported in IR, and used for some helper method generation
* assignment helper functions will generate array copies if necessary
2019-01-07 09:33:49 -06:00
Emilio Cobos Álvarez
094cd2bf5d Update syn.
Fixes #244
2018-12-29 14:25:50 +01:00
Ryan Hunt
ad2dc376e1 Release 0.6.7 2018-10-30 13:21:39 -05:00
Ryan Hunt
54424c5474 Release 0.6.6 2018-10-17 16:34:56 -05:00
Ryan Hunt
2d65f8f10b Release 0.6.5 2018-10-16 16:45:04 -05:00
Sylvestre Ledru
5c6da04883 Ship the tests too
Packagers would like to have access to the test suite to make sure they don't regress
2018-10-15 22:22:19 -05:00
Ryan Hunt
e5cd04aff3 Release 0.6.4 2018-10-04 13:53:10 -05:00
Ryan Hunt
961ed1dd93 Update issue number for serde_derive pinning workaround 2018-10-01 16:51:15 -05:00
Josh Stone
de6c08c057 Bump to serde_derive 1.0.58
This will in turn build with `syn 0.13` and `quote 0.5`, which is still
distinct from cbindgen's own dependencies, so it won't get "infected" by
the proc-macro feature.
2018-10-01 16:49:06 -05:00
Ryan Hunt
545f81e01b Release 0.6.3 2018-08-28 18:28:43 -05:00
kpcyrd
67370efbcf Bump log dependency 2018-08-28 16:06:45 -05:00
kpcyrd
a22c9a9798 Replace deprecated tempdir with tempfile 2018-08-28 16:06:45 -05:00
Ryan Hunt
101e025e49 Release 0.6.2 2018-08-21 17:11:37 -05:00
Ryan Hunt
c2aae5b07f Release 0.6.1 2018-07-25 14:09:01 -05:00
Ryan Hunt
e36f1854ca Update to mainline syn 0.14.1 2018-05-31 10:41:49 -05:00
Ryan Hunt
873d1bda53 Release 0.6.0 2018-04-25 15:02:19 -05:00
Ryan Hunt
092aeb06e6 Revert "Switch back to mainline syn instead of using standalone-syn"
This reverts commit 54dcb1c13180b42a7f7eaa2266789875e8a54153.
2018-04-25 14:24:31 -05:00