C++
shared_ptr<Foo> create_foo();
Rust
extern "C" {
pub fn create_foo() -> ???;
}
Bindgen turns a shared_ptr into an opaque blob.
I can't just take the raw pointer because then the C++ code is unaware that I have a reference to Foo and might call its deconstructor.