Releases: google/autocxx
v0.23.0
What's Changed
The major change here is a lot of rework of the safety!(unsafe_references_wrapped)
mode, based on the researches done here. This is a compatibility break, but only if you're using that mode.
- Rewrite reference_wrapper.rs to be structs. by @adetaylor in #1164
There are also significant bug fixes to extern_rust_type!()
as noted below.
Other features
- Support
extern_cpp_type!
with a different name by @bsilver8192 in #1150 (thanks!)
Bug fixes
- Fix problem with functions returning references which took non-reference parameters. by @adetaylor in #1156
- Merge bindgen upstream 0.62 by @adetaylor in #1183 (fixes an incompatibility with the latest clang, #1182)
- Fix 1161 by @adetaylor in #1162 (a problem with
extern_rust_type
) - Extern rust fun type checking by @adetaylor in #1168 (thanks to "Add failing test for extern_rust_function" by @Ravenslofty in #1166)
- Fix movability of structs with enum fields by @adetaylor in #1179
Misc changes
- Remove extra logging by @adetaylor in #1157
- Rust 1.64 clippy lint. by @adetaylor in #1160
- Partial fix for issue 1097. by @adetaylor in #1158
- Revise cxx to 1.0.78. by @adetaylor in #1163
- Slight reduction speedup. by @adetaylor in #1171
- Format tomls by @adetaylor in #1175
- Update deps, format TOML by @vorot93 in #1152
- Adding a test. by @adetaylor in #1173
- Remove dependency on rustc_version. by @adetaylor in #1176
- Reduce includes a call to
rustc
by @adetaylor in #1172 - Nightly clippies by @adetaylor in #1184
- Work towards handling
=default
functions by @adetaylor in #1180
New Contributors
- @Ravenslofty made their first contribution in #1166
- @vorot93 made their first contribution in #1152
Full Changelog: v0.22.4...v0.23.0
v0.22.4
What's Changed
- Pretty print using prettyplease instead of rustfmt by @dtolnay in #1127
- Disable windows GNU by @adetaylor in #1136
- Bump mdbook to fix build on nightly by @bsilver8192 in #1139
- Generate
impl UniquePtr
for abstract types too by @bsilver8192 in #1137 - Fix new clippy and doc warnings in 1.63.0 by @bsilver8192 in #1148
- Support multiple AUTOCXX_RS_JSON_ARCHIVE entries by @bsilver8192 in #1147
- Add failing test case, issue 1143 by @boydjohnson in #1145
- Revise to autocxx-bindgen 0.60.1 by @adetaylor in #1149
- Update autocxx-bindgen and bump version to 0.22.4 by @chbaker0 in #1153
- Revise to 0.22.4. by @adetaylor in #1154
New Contributors
- @boydjohnson made their first contribution in #1145
Full Changelog: v0.22.3...v0.22.4
v0.22.3
What's Changed
The change here is an experimental new mode to use reference wrappers for C++ code, as explained here and in this example.
- Detect segfaults in reduction by @adetaylor in #1123
- Add test for issue 1125. by @adetaylor in #1126
- Introduce C++ reference wrappers by @adetaylor in #1070
- Revise to 0.22.3. by @adetaylor in #1131
Full Changelog: v0.22.2...v0.22.3
v0.22.2
What's Changed
- Slight speed improvement: tell bindgen to skip rustfmt by @bsilver8192 in #1109
- Replace lingering tempdir usages with tempfile by @chbaker0 in #1120
- Minor doc updates. by @adetaylor in #1117
- Fix faulty test_fixed_num test. by @adetaylor in #1118
New Contributors
Full Changelog: v0.22.1...v0.22.2
v0.22.1
What's Changed
One new feature:
- Add a function to upcast UniquePtr by @bsilver8192 in #1112 (thanks!)
A roll of the minimum cxx version to work around a new clippy warning:
- Roll cxx minimal version. by @adetaylor in #1104
Lots of bug fixes:
- Solve anonymous namespaces and other problems by @adetaylor in #1088
- Ignore types named
_bindgen_ty
by @adetaylor in #1091 - Alter mdbook-mermaid installation. by @adetaylor in #1102
- Succeeding test for issue 1081 by @adetaylor in #1101
- Fix and test extern_cpp_type with type in a C++ namespace by @bsilver8192 in #1100
- Adding lots of ignored tests by @adetaylor in #1106
- Reject type params in typedefs by @adetaylor in #1108
- Issue 1094 by @adetaylor in #1095
- Fix #1092. by @adetaylor in #1093
- Reject typedefs to anon namespaces. by @adetaylor in #1107
- Fix and test subclass without
safety!(unsafe)
by @bsilver8192 in #1111 - Fix and test subclasses with C++ std in scope by @bsilver8192 in #1110
There is currently a known soundness problem, as noted in #1006.
Full Changelog: v0.22.0...v0.22.1
v0.22.0
What's Changed
Major changes to how the command line generation tool autocxx_gen
works. If you're just using cargo
you probably don't need to worry about this, but if you're using other build systems you'll almost certainly need to make changes.
- Remove --skip-cxx-gen by @adetaylor in #1052
- Support generating multiple bindings with a single
autocxx_gen
invocation by @adetaylor in #1061 - Minor cleanups by @adetaylor in #1051
There's also a compatibility change in that make_unique
methods have been removed. They've been deprecated for a few releases now, so this shouldn't come as a surprise. Append .within_unique_ptr()
everywhere you would have used it.
- Remove make_unique. by @adetaylor in #1040
This release also upgrades some of our dependencies:
- Upgrade to clap 3 by @gabriel-viviani (thanks!) in #1037
But mostly there are lots of bug fixes for cases where autocxx previously failed.
- Fix 'unsupported type' problem for typedefs pointing to enums by @adetaylor in #1074
- Properly disregard variadic functions by @adetaylor in #1076 (thanks to @yuxuan-xie for the report)
- Ignore inner type opaque typedefs by @adetaylor and @yuxuan-xie (thanks!) in #1083
- Fix "invalid application of" bug by @adetaylor in #1072
- Fwd decls in
&UniquePtr<T>
by @adetaylor in #1085 - Instantiable opaques by @adetaylor in #1086 (this one introduces a new directive,
instantiable!
, for niche cases) - Add test for 'array' is not a class, namespace, or enumeration by @adetaylor in #1080
- Do not fail when encountering
std::vector<char>
by @adetaylor in #1060
Various other bug fixes or minor changes:
- Achieve predictable iteration order. by @adetaylor in #1044 - this makes output more deterministic
- Fix excessive generate_pod output in repro cases. by @adetaylor in #1058 - fixes a bug in the reproduction pipeline
- Better logging from autocxx-reduce. by @adetaylor in #1062
- Avoid duplicate stddef introduction in reduction. by @adetaylor in #1063
- Avoid redefining cxx types in reduction by @adetaylor in #1064
- Add stress test reduction pipeline. by @adetaylor in #1069
Full Changelog: v0.21.2...v0.22.0
v0.21.2
What's Changed
- Treat C++ warnings as fatal within the test suite, revealing a problem that needed to be fixed in our generated code...
- Fix unnecessary
std::move
by @adetaylor in #1048
Full Changelog: v0.21.1...v0.21.2
v0.21.1
What's Changed
Significant improvement (though some corner cases wouldn't surprise me): where possible, treat incomprehensible typedefs as opaque types by @adetaylor in #1035. Previously if we encountered a type that bindgen couldn't fully handle, we ignored that type plus any typedefs that depended upon it. Now, we still discard the type - but typedefs should continue to be somewhat usable.
Bug fixes
- Allow implicit constructors for structs with array fields by @adetaylor in #1039
- Fix pin problem. by @adetaylor in #1046
Internal and testing changes
- Modularize directive handling. by @adetaylor in #1032
- Add test for base class destructors getting called. by @adetaylor in #1041
- Add missing forward declaration tests. by @adetaylor in #1042
- Minor demo code updates. by @adetaylor in #1043
Full Changelog: v0.21.0...v0.21.1
v0.21.0
What's Changed
Major breaking change:
- Functions which return (non-POD) values no longer return a
UniquePtr
. Instead they return animpl New
, so you can emplace them on the stack or in aBox
if you prefer. If in doubt, simply append.within_unique_ptr()
to go back to the old behavior. (#998) - Function calls which take rvalue reference parameters (
Thingy&&
) are now supported (#821)
Bug fixes:
- Fix for mdbook off-by-one test ID. by @adetaylor in #1028
Full Changelog: v0.20.1...v0.21.0
v0.20.1
What's Changed
- Bug fix to stop important error messages disappearing (thanks to @testforvln for the report) - in #1021
- Slightly more flexibility when storing C++ objects in Rust boxes:
- Cease to need MakeCppStorage to put something in a Box by @adetaylor in #1022
- impl
ValueParam
forPin<Box<T>>
by @adetaylor in #1024
Various internal tidyings.
- Outdent a test. by @adetaylor in #1023
- Fix destructor trait safety. by @adetaylor in #1025
- Unsafe dialect by @adetaylor in #1026
- Upgrade to 0.20.1. by @adetaylor in #1027
The next release is likely to be a significant compatibility break as we land a major part of #379.
Full Changelog: v0.20.0...v0.20.1