Closed owenshoemaker closed 10 months ago
Is it possible to return an FFI compatible struct from a foreign_class method? I have tried a number of approaches and haven't had any success and can't find any documentation.
I am just trying to return something like this:
pub struct SimpleStruct { pub my_string: *const c_char, }
I just get the "Do not know conversion from such rust type" error.
You can find example here:
https://github.com/Dushistov/flapigen-rs/blob/c74d48439895ae7394990b771a5acde54e309bfe/cpp_tests/src/cpp_glue.rs.in#L970
That did the trick. I just needed to use: "*const ::std::os::raw::c_char".
Thanks!
Is it possible to return an FFI compatible struct from a foreign_class method? I have tried a number of approaches and haven't had any success and can't find any documentation.
I am just trying to return something like this:
[repr(C)]
pub struct SimpleStruct { pub my_string: *const c_char, }
I just get the "Do not know conversion from such rust type" error.