Skip to content

Bindgen produces inconsistent enum types when run on windows vs linux #15

@aloucks

Description

@aloucks

The raw C enum types end up as libc::c_int or libc::c_uint depending on which platform they are generated on. This is an issue with clang/bindgen. The C spec states that enums should be int but bindgen uses whatever comes out of clang and clang is producing the u32 on linux. This doesn't really create a problem in the user facing API but does mean that regenerating the bindings from different platforms requires manual fixup (either manually update the generated code or manually change the Rust enum representations).

See:

rust-lang/rust-bindgen#1966

rust-lang/rust-bindgen#1907

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions