Can you retrieve a struct from a library?

The in-process plugin infra/model is quite brittle at the moment. This fairly recent thread discussed some of the gotchas around it and might be helpful to you.