Where is Swift Package Manager documentation?

OK I have searched the internet and I cannot find any source which explain the whole syntax for swift package manager.

My Swift code use C libraries so I need to include -Xcc -l ... and -Xlinker -L.... parameters with swift build everytime I want to build my project. How can i automatize it? I want to put those parameters into my Package.swift. There is zero documentation about this issue. I use Linux not MacOS.

1 Like


(i.e. at swift.org under “Documentation” → “Swift Package Manager”.)

It is separated in 2 parts on swift.org:

The API documentation is grouped in and accessible through the "Documentation" page.

The more tutorial-like part is grouped in the "Projects" section.

Yes I can found these links via google. I mean, how can I use -Xcc, -Xlinker with Swift Package manager? Where and how I can use LinkerSettings option?

The evolution proposal for build settings in SwiftPM has some nice examples: https://github.com/apple/swift-evolution/blob/master/proposals/0238-package-manager-build-settings.md#example


Thx man :+1: