This proposal suggests to create swift service manager extension of swiftpm, in which developers can publish services which depend of each other. Each service has a protocol and an implementation. the consumers of thoses services can import them into their project target as is, or they can replace one or more service implementations down the line. Swift Foundation framework should provide a ServiceProducer class to provide the current implementation of any required service in the runtime. This can be decided during the build process.
For more detail check: