so i'm interfacing with a glib based library using the cpp crate. At one point, this library returns a "gint", which is basically glib's renamed version of C's int. Unfortunately, int's size depends on the platform and the compiler, and it's either 16, 32, or 64 bits long. Now if i want to use that value in rust, what type should it be? is there some type that's platform dependant and will always be the same size as whatever the c++ compiler used by the cpp crate uses as its int type?
The libc crate specializes its type definitions for each target platform. It happens that all supported platforms currently use type c_int = i32, but this is not guaranteed for all platforms everywhere.