Depending on the library, you can avoid the `.header` altogether and rely on the ABI instead. Or you exploit the fact that an `importc`'ed type is well imported: {.pragma: impapi_typesHdr, header: tm_dir & "api_types.h".} type tm_tt_id_t* {.bycopy, union, impapi_typesHdr, importc: "struct tm_tt_id_t".} = object u64*: uint64 `type`*: uint64 generation*: uint64 index*: uint64 Run
- Suggestion on wrapping C union with anonymous struct? Araq