At the junction of interfaces

Suppose that I have this datum:

let chars : *mut u8 = ... ;
let size : u8 = ... ;

How can I pass this to a function that expect &[u8] ?

You can use std::slice::from_raw_parts.