@@ -108,55 +108,85 @@ and can be installed by simply copying.
108
108
109
109
### Installing the SDK
110
110
111
- Before you start, it's important to note:
111
+ #### (1) Prerequisites
112
112
113
- * You will need to [ install an Open Source toolchain from
114
- swift.org] ( /install/ ) .
113
+ Before starting, please note the following requirements:
115
114
116
- * You cannot use the toolchain provided with Xcode to build programs
117
- using the SDK .
115
+ * You need to install an open-source [ Swift toolchain ] ( /install/ ) from
116
+ swift.org .
118
117
119
- * If you are using macOS, you will also need to ensure that you use
120
- the Swift compiler from this toolchain by [ following the
121
- instructions
122
- here ] ( /install/macos/package_installer/ ) .
118
+ * If you are using macOS, note that you cannot use the toolchain
119
+ provided with Xcode to build programs using the SDK. Instead, just
120
+ to remind you, you must use the Swift compiler from the open-source
121
+ toolchain (see above ).
123
122
124
- * The toolchain must match the version of the Static Linux SDK that
125
- you install. The Static Linux SDK includes the corresponding Swift
126
- version in its filename to help identify the correct version of the
127
- SDK.
123
+ #### (2) Pre-Installation Notes
128
124
129
- * When installing Swift SDKs from remote URLs, you have to pass a
130
- ` --checksum ` option with the corresponding checksum provided by the
131
- author of the Swift SDK.
125
+ Please be aware of:
132
126
133
- Once that is out of the way, actually installing the Static Linux SDK
134
- is easy; at a prompt, enter
127
+ * Version compatibility: The Swift toolchain must match the version of
128
+ the Static Linux SDK that you install.
129
+
130
+ * Clean installation: If you previously installed an SDK for a
131
+ different Swift toolchain version, remove the old one before
132
+ installing the new one (see management commands below).
133
+
134
+ * Checksum verification: When installing Swift SDKs from remote URLs,
135
+ you must pass a ` --checksum ` option with the corresponding checksum
136
+ provided by the SDK author.
137
+
138
+ * Command pattern: The installation follows the pattern described in
139
+ the next sections.
140
+
141
+ #### (3) Download and Install the Static Linux SDK
142
+
143
+ To obtain the Static Linux SDK:
144
+
145
+ * Visit the swift.org [ installation
146
+ page] ( https://www.swift.org/install ) for complete Static Linux SDK
147
+ installation instructions, where you can download directly or click
148
+ "Copy install command".
149
+
150
+ * For previous releases, navigate to "Previous Releases" on the
151
+ installation page.
152
+
153
+ * For development snapshots, access the static-sdk YAML file for your
154
+ target branch (e.g., swift-6.2-branch snapshots
155
+ [ here] ( https://github.com/swiftlang/swift-org-website/blob/main/_data/builds/swift-6_2-branch/static-sdk.yml ) )
156
+ to quickly construct the install command (following the pattern
157
+ explained below) by browsing the available checksums.
158
+
159
+ #### (4) Installation Commands Pattern
160
+
161
+ The basic installation command follows this pattern:
135
162
136
163
``` console
137
164
$ swift sdk install < URL-or-filename-here> [--checksum < checksum-for-archive-URL> ]
138
165
```
139
166
140
- giving the URL (and a corresponding checksum) or filename at which the SDK can be found.
167
+ You can provide either a URL (with corresponding checksum) or a local
168
+ filename where the SDK can be found.
141
169
142
- For instance, assuming you have installed the
143
- ` swift-6.0-DEVELOPMENT-SNAPSHOT-2024-07-02-a ` toolchain, you would
144
- need to enter
170
+ For example, if you have installed the ` swift-6.1.2-RELEASE ` toolchain, you would enter:
145
171
146
172
``` console
147
- $ swift sdk install https://download.swift.org/swift-6.0-branch /static-sdk/swift-6.0-DEVELOPMENT-SNAPSHOT-2024-07-02-a /swift-6.0-DEVELOPMENT-SNAPSHOT-2024-07-02-a_static- linux-0.0.1.artifactbundle.tar.gz --checksum 42a361e1a240e97e4bb3a388f2f947409011dcd3d3f20b396c28999e9736df36
173
+ $ swift sdk install https://download.swift.org/swift-6.1.2-release /static-sdk/swift-6.1.2-RELEASE /swift-6.1.2-RELEASE_static- linux-0.0.1.artifactbundle.tar.gz --checksum df0b40b9b582598e7e3d70c82ab503fd6fbfdff71fd17e7f1ab37115a0665b3b
148
174
```
149
175
150
- to install the corresponding Static Linux SDK.
176
+ This will download and install the corresponding Static Linux SDK on
177
+ your system.
178
+
179
+ #### (5) Managing Installed SDKs
180
+
181
+ After installation, you can manage your SDKs using these commands:
151
182
152
- Swift will download and install the SDK on your system. You can get a
153
- list of installed SDKs with
183
+ List all installed SDKs:
154
184
155
185
``` console
156
186
$ swift sdk list
157
187
```
158
188
159
- and it's also possible to remove them using
189
+ Remove an SDK:
160
190
161
191
``` console
162
192
$ swift sdk remove < name-of-SDK>
0 commit comments