I have a case where I need to convert some headers which contain binary blob arrays.
Bindgen only generates their name. Below I have a minimal example.
Input C/C++ Header
static const unsigned char data[] = {
0x01, 0x02, 0x03, 0x04
};
Bindgen Invocation
Actual Results
/* automatically generated by rust-bindgen */
extern "C" {
#[link_name = "\u{1}data"]
pub static mut data: [::std::os::raw::c_uchar; 4usize];
}
Expected Results
I'm not sure what would be the best result, but something similar to:
pub const data: [::std::os::raw::c_uchar; 4usize] = [0x01, 0x02, 0x03, 0x04];