On Wed, Sep 4, 2024 at 10:49 AM brian m. carlson <sandals@xxxxxxxxxxxxxxxxxxxx> wrote: > > On 2024-09-04 at 17:30:53, Calvin Wan wrote: > > After getting rid of the `home` crate, the only other issue we ran into > > downgrading the version to 1.63 was with `std::ffi{c_char, c_int}`. > > Those were only made available in 1.64 and they are obviously quite > > necessary for us to be able to call C functions. Do you know of any > > alternatives we can use? I also don't think reinventing the wheel with > > our own implementation makes sense in this case, and even if Debian were > > to upgrade stable to a higher version today, we would still need to > > support oldstable for another year. > > I think we can do this with libc, which you're importing at the moment. > You can do something like this: > > src/types.rs: > ---- > pub use libc::{c_char, c_int}; > ---- > > and then do `use crate::types::{c_char, c_int}` wherever you want them. While this gets rid of `std::ffi{c_char, c_int}` dependency, `std::ffi{CStr, CString}` are also 1.64 unfortunately, and I don't see the equivalent of it in libc. I'll reroll v3 without this change for now. Hopefully Debian stable just upgrades to 1.64 or higher and we don't have to worry about these ffi conversions :)