Since the types in std::os::raw are not also in core, there’s no way to use them from a no-std program. Among other things, this is an issue for bindgen.
FWIW, there is a way to use it from a #[no_std] program, which is using the libc crate, or at least that’s the way you used to be able to do it IIRC
. That’s why bindgen has two different options, one to use core, and another to add a prefix for C-types, which usually is libc.
It’s not the first report about this being confusing, so a nicer solution would be really appreciated. Though that may mean more requirements for #[no_std] targets which also don’t need C types? Not sure about the trade-off here.