pub fn run_with_cstr<T, F>(bytes: &[u8], f: F) -> Result<T>where
    F: FnOnce(&CStr) -> Result<T>,