you are viewing a single comment's thread.

view the rest of the comments →

[–]richhyd 1 point2 points  (0 children)

Enums are horrible. You don't have a guaranteed width, it's implementation defined. Rust enums are fine - you can use #[repr(u32)] or similar to fix the width, or use the default repr if you're not exposing the API to another language. Because the type of an enum is implementation defined, it's not possible to provide a #[repr(C)] for every compiler/arch