Keeping Julia structure in memory between embedded function calls from C++

So I have a Julia package. I would like to make use of the package in C++. From what I can tell from the documentation, only arrays and scalars can be passed between the C++/Julia boundary.

In particular I’m using the RigidBodyDynamics. I would like to parse a URDF XML file into a Mechansim Julia structure by passing the path of the URDF XML from C++. I would then like the C++ code to subsequently make repeated calls to other embedded functions from the RigidBodyDynamics package that require a Mechanism structure to be passed as an input and updated. However I do not want to have to have to convert the Mechansim struct to a series of arrays every time when returning from Julia to C++, and I don’t want to have to convert a series of arrays into a Mechanism structure each time I call one of the embedded functions. Instead I would like to somehow keep the Julia Mechansim struct active in memory inbetween embedded calls from C++.

Is this possible? If so does anyone have recommendations as to how I might approach this?