dtolnay/cxx

Support rust::Vec and std::vector of SharedPtr to Opaque types

Open

#741 opened on Mar 17, 2021

View on GitHub
 (1 comment) (1 reaction) (0 assignees)Rust (253 forks)batch import
help wanted

Repository metrics

Stars
 (4,472 stars)
PR merge metrics
 (Avg merge 8m) (3 merged PRs in 30d)

Description

I understand, why we can't hold opaque types in both vectors, but why we can't hold SharedPtrs to this types?

Those functions are currently unavailable.

#[cxx::bridge]
mod ffi {
  unsafe extern "C++" {
    fn opaqueVector() -> &'static CxxVector<SharedPtr<CxxString>>;
    fn opacueVec() -> Vec<SharedPtr<CxxString>>;
  }
}

Contributor guide