Matlab, Rust.
f64, pub y: f64, } #[no_mangle] pub extern "C" fn distance_between_ffi(p1: &PointFFI, p2: &PointFFI) -> f64 { let p1 = &Point { x: p1.x, y: p1.y, }; let p2 = &Point { x: p2.x, y: p2.y, }; p1.distance_to(p2) } The general pattern when writing a wrapper that accepts or returns structs is to convert