thanks for replay @kornel
So I can write something like this
pub fn generate_data() -> &'static [u8] {
// returning &[u8]
}
And use it as a byte buffer pointer from C/C++ ?
If I got it right, ownership for the data passed with static lifetime would be on C/C++ for memory cleanup right?