Matlab, Rust.
is able to guarantee that any reference is always valid, but since this pointer is coming from outside, Rust has no way of knowing that it is a valid pointer. That’s why we need to wrap the conversion from the pointer in an unsafe block. Once we have a reference to &CStr, we need to convert to &str