#1743·cxx

Why is `Vec` `needs_indirect_abi`?

Author: heinrich5991Created Jul 12, 2026Updated Jul 12, 2026

Is this just an oversight?

https://github.com/dtolnay/cxx/blob/33b21de1270f8650394a8925beacaf7a8a9f0a02/syntax/types.rs#L302-L315

The function needs_indirect_abi doesn't have a case for RustVecs, but I don't understand why they would need an indirect ABI, they have the cxx::private::RustVec wrapper type after all, which should be ABI-compatible with the C++ side rust::Vec.

Can I PR a change where I change RustVec to allow direct ABI?