Skip to content

Commit dbeee8a

Browse files
Drop Swift 6.0 support (#500)
1 parent e211f07 commit dbeee8a

File tree

4 files changed

+18
-40
lines changed

4 files changed

+18
-40
lines changed

.github/workflows/test.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,6 @@ jobs:
99
strategy:
1010
matrix:
1111
entry:
12-
- os: ubuntu-22.04
13-
toolchain:
14-
download-url: https://download.swift.org/swift-6.0.2-release/ubuntu2204/swift-6.0.2-RELEASE/swift-6.0.2-RELEASE-ubuntu22.04.tar.gz
15-
wasi-backend: Node
16-
target: "wasm32-unknown-wasi"
1712
- os: ubuntu-22.04
1813
toolchain:
1914
download-url: https://download.swift.org/swift-6.1-release/ubuntu2204/swift-6.1-RELEASE/swift-6.1-RELEASE-ubuntu22.04.tar.gz

CONTRIBUTING.md

Lines changed: 16 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -18,41 +18,24 @@ Thank you for considering contributing to JavaScriptKit! We welcome contribution
1818
cd JavaScriptKit
1919
```
2020

21-
2. Install **OSS** Swift toolchain (not the one from Xcode):
22-
<details>
23-
<summary>For macOS users</summary>
24-
25-
```bash
26-
(
27-
SWIFT_TOOLCHAIN_CHANNEL=swift-6.0.2-release;
28-
SWIFT_TOOLCHAIN_TAG="swift-6.0.2-RELEASE";
29-
SWIFT_SDK_TAG="swift-wasm-6.0.2-RELEASE";
30-
SWIFT_SDK_CHECKSUM="6ffedb055cb9956395d9f435d03d53ebe9f6a8d45106b979d1b7f53358e1dcb4";
31-
pkg="$(mktemp -d)/InstallMe.pkg"; set -ex;
32-
curl -o "$pkg" "https://download.swift.org/$SWIFT_TOOLCHAIN_CHANNEL/xcode/$SWIFT_TOOLCHAIN_TAG/$SWIFT_TOOLCHAIN_TAG-osx.pkg";
33-
installer -pkg "$pkg" -target CurrentUserHomeDirectory;
34-
export TOOLCHAINS="$(plutil -extract CFBundleIdentifier raw ~/Library/Developer/Toolchains/$SWIFT_TOOLCHAIN_TAG.xctoolchain/Info.plist)";
35-
swift sdk install "https://github.com/swiftwasm/swift/releases/download/$SWIFT_SDK_TAG/$SWIFT_SDK_TAG-wasm32-unknown-wasi.artifactbundle.zip" --checksum "$SWIFT_SDK_CHECKSUM";
36-
)
37-
```
38-
39-
</details>
40-
41-
<details>
42-
<summary>For Linux users</summary>
43-
Install Swift 6.0.2 by following the instructions on the <a href="https://www.swift.org/install/linux/tarball/">official Swift website</a>.
44-
21+
2. Install **OSS** Swift toolchain via `swiftly`
22+
3. Install Swift SDK for Wasm corresponding to the Swift version:
4523
```bash
4624
(
47-
SWIFT_SDK_TAG="swift-wasm-6.0.2-RELEASE";
48-
SWIFT_SDK_CHECKSUM="6ffedb055cb9956395d9f435d03d53ebe9f6a8d45106b979d1b7f53358e1dcb4";
49-
swift sdk install "https://github.com/swiftwasm/swift/releases/download/$SWIFT_SDK_TAG/$SWIFT_SDK_TAG-wasm32-unknown-wasi.artifactbundle.zip" --checksum "$SWIFT_SDK_CHECKSUM";
25+
set -eo pipefail; \
26+
V="$(swiftc --version | head -n1)"; \
27+
TAG="$(curl -sL "https://raw.githubusercontent.com/swiftwasm/swift-sdk-index/refs/heads/main/v1/tag-by-version.json" | jq -e -r --arg v "$V" '.[$v] | .[-1]')"; \
28+
curl -sL "https://raw.githubusercontent.com/swiftwasm/swift-sdk-index/refs/heads/main/v1/builds/$TAG.json" | \
29+
jq -r '.["swift-sdks"]["wasm32-unknown-wasip1"] | "swift sdk install \"\(.url)\" --checksum \"\(.checksum)\""' | sh -x
30+
);
31+
export SWIFT_SDK_ID=$(
32+
V="$(swiftc --version | head -n1)"; \
33+
TAG="$(curl -sL "https://raw.githubusercontent.com/swiftwasm/swift-sdk-index/refs/heads/main/v1/tag-by-version.json" | jq -e -r --arg v "$V" '.[$v] | .[-1]')"; \
34+
curl -sL "https://raw.githubusercontent.com/swiftwasm/swift-sdk-index/refs/heads/main/v1/builds/$TAG.json" | \
35+
jq -r '.["swift-sdks"]["wasm32-unknown-wasip1"]["id"]'
5036
)
5137
```
52-
53-
</details>
54-
55-
3. Install dependencies:
38+
4. Install dependencies:
5639
```bash
5740
make bootstrap
5841
```
@@ -62,7 +45,7 @@ Thank you for considering contributing to JavaScriptKit! We welcome contribution
6245
Unit tests running on WebAssembly:
6346

6447
```bash
65-
make unittest SWIFT_SDK_ID=wasm32-unknown-wasi
48+
make unittest
6649
```
6750

6851
Tests for `PackageToJS` plugin:
@@ -112,7 +95,7 @@ Run this script when you've made changes to:
11295
11396
These changes require updating the pre-generated Swift bindings committed to the repository.
11497
115-
**Adding new BridgeJS intrinsics:**
98+
**Adding new BridgeJS intrinsics:**
11699
117100
If you add new `@_extern(wasm, module: "bjs")` functions to [`BridgeJSIntrinsics.swift`](Sources/JavaScriptKit/BridgeJSIntrinsics.swift), also add corresponding stub entries to [`Plugins/PackageToJS/Templates/instantiate.js`](Plugins/PackageToJS/Templates/instantiate.js) in the `importObject["bjs"]` object. This allows packages without BridgeJS-generated code to instantiate successfully.
118101

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version:6.0
1+
// swift-tools-version:6.1
22

33
import CompilerPluginSupport
44
import PackageDescription

Sources/JavaScriptKit/Documentation.docc/Articles/Deploying-Pages.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
name: github-pages
6464
url: ${{ steps.deployment.outputs.page_url }}
6565
runs-on: ubuntu-latest
66-
container: swift:6.0.3
66+
container: swift:6.2
6767
steps:
6868
- uses: actions/checkout@v4
6969
- uses: actions/setup-node@v4

0 commit comments

Comments
 (0)