Struct to Data and backwards

Yes.

The easiest way to get a small C module building and all the correct paths sent to your Swift module is via SwiftPM. It will automatically detect a C library target, and your Swift module can depend on it and use the type defined there.