Open svok opened 6 months ago
So, I was a bit wrong. That was just an error in enum generation. Any enum is converted into such a structure:
enum FfiPoll_u32_Tag {
Ready_u32,
Pending_u32,
Panicked_u32,
};
typedef uint8_t FfiPoll_u32_Tag;
And it is not working for c compiler.
uint8_t
- where is it from?style = "tag"
that manages style of generation. But it is not applied to enums, while it should to be as I see.
I'm trying to generate header file for a test with async-ffi crate and getting such a result:
With this file I get an error: "'FfiPoll_u32_Tag' is going to be declared twice". As far as I understand, this is due to the name of the FfiPoll_u32 struct field "tag" is converted to the same name as the enum. I tried different renaming configurations and they didn't help me.
The test application code:
And the
cbindgen.toml
fileOther information: