Matlab, Rust.
to return a struct that was created in Rust, then just like with the strings, you should extract the values that you need and then return the pointers to Rust so that Rust can free the memory. I won’t go into it here, but it works exactly the same as we covered in the previous section on strings —