CGlue 0.2.4 Is Out For Easier Trait ABI Safety
Happy holidays, everyone!
I'm proud to announce one final CGlue release for this year, the highlight being ability to use layout_checks feature on non-git builds!
For those unfamiliar, CGlue is a code generator which aims to provide seamless use of traits across FFI-boundary (from dynamically loaded Rust libraries, C or C++ code). Version 0.2 was released a month ago, which added support for checking checking trait layout compatibility thanks to integration with abi\_stable. However, due to one missing trait implementation (on c_void), a patch was needed to make CGlue code compile with said feature. I was afraid of defining my own void type, because that could break the way cbindgen treats voids, but with a transparent struct I could eat the cake and have it too!
This latest release also adds several new features, such as CVec type, boxed slices, and a path forward to not pollute local scope when not needed (full transition will have to wait until 0.3 to be semver-compliant).
I never made a proper announcement for 0.2.3, so here's a quick rundown of what happened there:
Format traits were made ABI-safe, thanks to new ability to override arguments, and behavior of C wrappers. It might not behave exactly the same just yet when alignment and padding is involved, but that is to be improved upon.
Anyways, this is it from me, you can find CGlue here, and I hope you're having great holidays :)