How do I create an owned array in a given memory zone in Rust?

47 views Asked by At

I need to access a memory zone in Rust to read and write from it. I've tried using &mut [u8] as the type to represent the memory but I need it to be owned by the struct. So ideally I need to convert a *mut u8 and a usize into an owned array.

I am using no_std so I dont have access to alloc so Vec isnt an option either.

Is this even possible? Or is my architecture just wrong and I should find another way to do it?

0

There are 0 answers