Given that the size of an enum in C is implementation defined, what is the size of a
repr(C) enum in rust? Is it always the size of a
c_int? Or do we let the llvm backend pick the size?
I’m wondering how ffi-safe
repr(C) enums actually are. If I was to build a rust library with
extern "C" functions which take enums, how reliably could I call those functions from C programs built with various different toolchains? Are enums any less safe than structs in this regard? I ask because the author of cbindgen seems to think they are: https://github.com/eqrion/cbindgen/issues/8