From Swift package manifest cheatsheet how to set difines directly in Package.swift:

swiftSettings: [
    .define("DEBUG", .when(platforms: [.iOS, .macOS, .tvOS, .watchOS], configuration: .debug)),
    .unsafeFlags(["-D EXAMPLE"]),
    .unsafeFlags(["-D EXAMPLE"], .when(platforms: [.iOS], configuration: .debug)),

Immediately used in in swift-png to pass NO_INTRINSICS on Windows.

Cool that swift package could depend on libraries which could be installed with brew or apt.

Read All about the Swift Package Manager and the Swift toolchain. Mess. But there’re interesting finding:

swift lol
error: unable to invoke subcommand:
(No such file or directory)

swift build, run, test subcommands are just another Swift binary executables placed inside the toolchain’s binary path. (Named like: swift-package, swift-build, swift-run, swift-test).

People do things like swift-ci, CI written in Swift.

Read Deep dive into Swift frameworks: Learn everything about Swift modules, libraries, packages, closed source frameworks, command line tools and more..

Browsed Swift Package Manager Usage. I did missed that such documentation exists. Why there’s no direct link to it from Learned about swift package resolve.