Open chris838 opened 3 weeks ago
It seems like cxx rejects Vec<[u64; 3]> as a supported type, though Vec<T> and [T; N] are both supported individually.
Vec<[u64; 3]>
Vec<T>
[T; N]
Steps to reproduce:
// main.rs include!("include/foo.h"); #[cxx::bridge] pub mod ffi { unsafe extern "C++" { fn foo(x: Vec<[u64; 3]>); } }
// foo.h void foo(rust::Vec<std::array<uint64_t, 3>> x);
Produces the following error:
error[cxxbridge]: unsupported element type of Vec ┌─ src/main.rs:17:19 │ 17 │ fn foo(x: Vec<[u64; 3]>); │ ^^^^^^^^^^^^^ unsupported element type of Vec
Referenced from this SA question: https://stackoverflow.com/questions/78616935/binding-rust-vect-n-to-c-using-cxx?noredirect=1#comment138602956_78616935
It seems like cxx rejects
Vec<[u64; 3]>
as a supported type, thoughVec<T>
and[T; N]
are both supported individually.Steps to reproduce:
Produces the following error:
Referenced from this SA question: https://stackoverflow.com/questions/78616935/binding-rust-vect-n-to-c-using-cxx?noredirect=1#comment138602956_78616935