Breaking changes
extern "C"
extern block in the FFI module is no longer accepted, writeextern "C++"
insteadextern "C++"
block must be writtenunsafe extern "C++"
if it contains at least one safe-to-call functionrust::Slice<T>
in C++ has been renamed torust::Slice<const T>
; support for &mut [T] post-1.0 will use therust::Slice<T>
name&mut T
where T is an opaque C++ type is no longer ever exposed to Rust, onlyPin<&mut T>
- Related to the previous:
UniquePtr
binding no longer implements DerefMut for opaque C++ types - If a function's implementation is unsafe in Rust,
extern "Rust"
block will enforce that it's listed asunsafe fn
in the extern block too - Opaque Rust types are required to be
Unpin
in addition toSized
- Opaque Rust types are required to be local to the current crate (for now; this may soon be lifted again)
- Handwritten
Unpin
impl for opaque C++ types are ruled out - Minimum supported rustc version is raised from 1.43 to 1.48