For the Linux and MacOS systems it seems as the generated bindgen code defines size_t = std::os::raw::c_ulong. But this is not something that can be taken for granted because size_t in C is an implementation defined typedef, so it will be dependant on the compiler what it is defined as. When generating bindings on windows (MSVC) as an example it dets defined as size_t = std::os::raw::c_ulonglong. I think it would be better to expose usize to the user and do all the conversion handling internally.
For the Linux and MacOS systems it seems as the generated bindgen code defines
size_t = std::os::raw::c_ulong
. But this is not something that can be taken for granted because size_t in C is an implementation defined typedef, so it will be dependant on the compiler what it is defined as. When generating bindings on windows (MSVC) as an example it dets defined assize_t = std::os::raw::c_ulonglong
. I think it would be better to exposeusize
to the user and do all the conversion handling internally.