dtolnay/cxx

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

开放

#741 创建于 2021年3月17日

 (1 条评论) (1 个反应) (0 位负责人)Rust (253 个派生)batch import
help wanted

仓库指标

星标
 (4,472 个星标)
PR 合并指标
 (平均合并 8分钟) (30 天内合并 3 个 PR)

描述

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>>;
  }
}

贡献者指南