Representing c unions and packed types

I’m currently writing language bindings for OpenVR to integrate with the Julia game engine I’m building.

I’ve run into two challenges:

  • The API uses (quite large) union types for its event system
  • The API uses pragma pack( push, 4 ) to align some of its structs

How can I manage things on the julia side to match these C language features at the API boundary?