Matlab, Rust.
follows: use std::ffi::{c_char, CStr, CString}; use crate::do_something_to_string; #[no_mangle] pub extern "C" fn do_something_to_string_ffi(input: *const c_char) -> *mut *mut c_char { let input_str = unsafe { CStr::from_ptr(input) } .to_str() .expect("Invalid UTF-8 in input"); let output =