Back to Swift Package Manager

swift sdk

Sources/PackageManagerDocs/Documentation.docc/SwiftSDKCommands.md

0.6.01.2 KB
Original Source

swift sdk

Perform operations on Swift SDKs.

@Metadata { @PageImage(purpose: icon, source: command-icon) @Available("Swift", introduced: "6.1") }

Overview

By default, Swift Package Manager compiles code for the host platform on which you run it. Swift 6.1 introduced SDKs (through SE-0387) to support cross-compilation.

SDKs are tightly coupled with the toolchain used to create them. Supported SDKs are distributed by the Swift project with links on the installation page for macOS and Linux, and included in the distribution for Windows.

Additionally, the Swift project provides the tooling repository swift-sdk-generator that you can use to create a custom SDK for your preferred platform.

Topics

Installing an SDK

Listing SDKs

Removing an SDK

Configuring an SDK

Deprecated Commands