The current jextract implementation creates layouts for structs/union during parsing. This means that the logic that visits clang cursors needs to, at the same time, create the struct/union jextract declaration and figure out the struct/union layout. This complex logic is defined in RecordLayoutComputer/StructLayoutComputer/UnionLayoutComputer.
It would be better if, during parsing, we only created a jextract declaration, and only computed layouts as a post-parsing step.
It would be better if, during parsing, we only created a jextract declaration, and only computed layouts as a post-parsing step.