Open
Description
Assume we have an opaque C++ type OpaqueType
that is used in Rust and a C++ function that returns std::shared_ptr<OpaqueType>
and another C++ function that takes std::shared_ptr<const OpaqueType>
as an argument. There is currently no way to directly call it.
Instead, we need to manually bind both OpaqueType
and ConstOpaqueType
as different independent types to Rust (in c++: using ConstOpaqueType = const OpaqueType
), and then also add a binding for a conversion function that converts from SharedPtr<OpaqueType>
to SharedPtr<ConstOpaqueType>
.
I don't really have a good idea how cxx.rs could improve the flow here, but writing up the issue as a pain point looking for a solution.
Metadata
Metadata
Assignees
Labels
No labels