All about Swift Package Manager Traits - The.Swift.Dev.
Discover how traits act as feature flags, enabling conditional compilation, optional dependencies, and advanced package configurations.
This maintains proposals for changes and user-visible enhancements to the Swift Programming Language. - swiftlang/swift-evolution
Discover how traits act as feature flags, enabling conditional compilation, optional dependencies, and advanced package configurations.
Here's a place to start if you are trying to get a handle on Swift compiler settings.
The foundation of a Swift package is worth understanding.
At long last, package traits are now supported in Xcode and I think it's a big deal.