feature(core_ffi_c) was stabilized (and possibly feature(c_size_t) in the future), so we may want to extend --use-core to use them (gated on --rust-target or some other flag).
In fact, it could potentially be made the default, since it would work for all projects (i.e. both std and no_std).
Currently, a workaround is to manually specify the prefix via --ctypes-prefix core::ffi.
Input C/C++ Header
Bindgen Invocation
$ bindgen input.h --use-core
Or in the future:
Actual Results
extern "C" {
pub fn f(arg1: ::std::os::raw::c_int);
}
Expected Results
extern "C" {
pub fn f(arg1: ::core::ffi::c_int);
}
feature(core_ffi_c)was stabilized (and possiblyfeature(c_size_t)in the future), so we may want to extend--use-coreto use them (gated on--rust-targetor some other flag).In fact, it could potentially be made the default, since it would work for all projects (i.e. both
stdandno_std).Currently, a workaround is to manually specify the prefix via
--ctypes-prefix core::ffi.Input C/C++ Header
Bindgen Invocation
Or in the future:
Actual Results
Expected Results