Does the Swift Package Manager work with Metal shaders? I would like to move my app's code into an "[AppName]Support" package, so I can use DocC. I have two things I don't know how to handle in a package...
The .metal files that I eventually load as mtlDevice.defaultLibrary().
The bridging header that allows me to share some struct types between .swift and .metal files.
There's some reference to how you can reference metal files from within SwiftPM on the Apple developer forums: Swift Package with Metal - it sounds like SwiftPM version 5.3 and later may have the support you want, but there are some caveats according to that forum post.
We do use some metal files in packages at my company, but there are some draw backs.
We can’t seem to get syntax highlighting and code completion to work inside metal files that reside in packages. We work around this by having a test Xcode project in the Swift Package repo that includes the metal shaders directly and do editing in that project, then compile our main app, which pulls in the Swift Package.
Thank you for the pointers guys. Since I've got my hands full already trying to learn Metal, I will avoid these extra complications for now, and leave the code in my app module.