You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/getting-started/setup-snapshot.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Installation - Development Snapshot
2
2
3
-
## WebAssembly SDK - Cross compile to WebAssembly
3
+
## Swift SDK for WebAssembly - Cross compile to WebAssembly
4
4
5
5
The upstream Open Source Swift toolchain does support WebAssembly as a target platform since **Swift 6.0**.
6
6
For those versions, you just need to install [Swift SDK for cross-compilation](https://github.com/apple/swift-evolution/blob/main/proposals/0387-cross-compilation-destinations.md).
> **Note**: Replace `<path-to-swift-toolchain-from-swift.org>` with the path to the development snapshot Swift toolchain you downloaded from [swift.org/install](https://www.swift.org/install).
27
+
28
+
3. Create a `.sourcekit-lsp/config.json` with the following content:
29
+
30
+
```json
31
+
{
32
+
"swiftPM": {
33
+
"swiftSDK": "<Swift SDK id>"
34
+
}
35
+
}
36
+
```
37
+
38
+
> **Note**: Replace `<Swift SDK id>` with the Swift SDK id you installed using the `swift sdk install` command. You can find the installed SDK id by running `swift sdk list`.
39
+
40
+
4. Reload the VSCode window by pressing `Cmd + Shift + P` and selecting `Reload Window`.
41
+
42
+
That's it! You can now build and auto-complete your Swift package using the Swift SDK for WebAssembly.
0 commit comments