simple jstruct plugin

Maurizio Cimadamore maurizio.cimadamore at
Thu May 7 15:52:34 UTC 2020

it can be sometimes useful to have a tool which parses header files and 
generates all the structs found inside them. This is useful when working 
with network protocols and the like, where a Java program might wish to 
use the memory access API w/o necessarily having a need to call any 
native function - or in any case where an interesting layout definition 
is provided as a struct/union in some header file.

To validate the jextract API, I wrote a very simple plugin that does 
exactly that; it is very rough (e.g. endianness is assumed to be always 
little_endian), but is good enough to handle some basic use cases 
encountered inside the JDK code base itself. I thought I'd share it here:


More information about the panama-dev mailing list