Skip to content

Commit 26d2561

Browse files
committed
update[static-sdk]: expand installation section
Signed-off-by: Melissa Kilby <[email protected]>
1 parent 43b23eb commit 26d2561

File tree

1 file changed

+57
-27
lines changed

1 file changed

+57
-27
lines changed

documentation/articles/static-linux-getting-started.md

Lines changed: 57 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -108,55 +108,85 @@ and can be installed by simply copying.
108108

109109
### Installing the SDK
110110

111-
Before you start, it's important to note:
111+
#### (1) Prerequisites
112112

113-
* You will need to [install an Open Source toolchain from
114-
swift.org](/install/).
113+
Before starting, please note the following requirements:
115114

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.
118117

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).
123122

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
128124

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:
132126

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:
135162

136163
```console
137164
$ swift sdk install <URL-or-filename-here> [--checksum <checksum-for-archive-URL>]
138165
```
139166

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.
141169

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:
145171

146172
```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
148174
```
149175

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:
151182

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:
154184

155185
```console
156186
$ swift sdk list
157187
```
158188

159-
and it's also possible to remove them using
189+
Remove an SDK:
160190

161191
```console
162192
$ swift sdk remove <name-of-SDK>

0 commit comments

Comments
 (0)