cxx icon indicating copy to clipboard operation
cxx copied to clipboard

Feature Request: Add support for nested Vector types

Open IBims1NicerTobi opened this issue 10 months ago • 1 comments

It would be great if there was some way to pass a Vec<Vec<T>> from Rust to C++. This is currently not possible without applying some hack with a struct and a Vec inside that struct which is very annoying and leads to extra boilerplate code on the C++ side. MWE:

#[cxx::bridge(namespace="test")]
mod ffi {
    extern "Rust" {
        fn test() -> Vec<Vec<f32>>;
    }
}

IBims1NicerTobi avatar Apr 18 '24 16:04 IBims1NicerTobi