Skip to content
Merged
17 changes: 4 additions & 13 deletions .github/workflows/test.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,18 +12,13 @@ jobs:
strategy:
matrix:
entry:
- os: ubuntu-22.04
toolchain:
download-url: https://download.swift.org/swift-6.1-release/ubuntu2204/swift-6.1-RELEASE/swift-6.1-RELEASE-ubuntu22.04.tar.gz
wasi-backend: Node
target: "wasm32-unknown-wasi"
env: |
JAVASCRIPTKIT_DISABLE_TRACING_TRAIT=1
- os: ubuntu-24.04
toolchain:
download-url: https://download.swift.org/development/ubuntu2404/swift-DEVELOPMENT-SNAPSHOT-2025-12-01-a/swift-DEVELOPMENT-SNAPSHOT-2025-12-01-a-ubuntu24.04.tar.gz
wasi-backend: Node
target: "wasm32-unknown-wasip1"
env: |
JAVASCRIPTKIT_DISABLE_TRACING_TRAIT=1
- os: ubuntu-24.04
toolchain:
download-url: https://download.swift.org/swift-6.3-branch/ubuntu2404/swift-6.3-DEVELOPMENT-SNAPSHOT-2026-03-05-a/swift-6.3-DEVELOPMENT-SNAPSHOT-2026-03-05-a-ubuntu24.04.tar.gz
Expand DownExpand Up@@ -77,10 +72,6 @@ jobs:
strategy:
matrix:
entry:
- image: "swift:6.1.2"
swift-syntax-version: "601.0.0"
- image: "swift:6.2"
swift-syntax-version: "602.0.0"
- image: "swift:6.3"
swift-syntax-version: "603.0.0"
runs-on: ubuntu-latest
Expand DownExpand Up@@ -110,7 +101,7 @@ jobs:
matrix:
include:
- os: macos-15
xcode: Xcode_16.4
xcode: Xcode_26.0.1
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
Expand All@@ -134,7 +125,7 @@ jobs:
format:
runs-on: ubuntu-latest
container:
image: swift:6.1.2
image: swift:6.3
steps:
- uses: actions/checkout@v6
- run: ./Utilities/format.swift
Expand Down
2 changes: 1 addition & 1 deletion Examples/Embedded/README.md
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
# Embedded example

Requires a recent DEVELOPMENT-SNAPSHOT toolchain. (tested with swift-6.1-DEVELOPMENT-SNAPSHOT-2025-02-21-a)
Requires a recent DEVELOPMENT-SNAPSHOT toolchain.

```sh
$ ./build.sh
Expand Down
222 changes: 0 additions & 222 deletions Package@swift-6.1.swift

This file was deleted.

7 changes: 0 additions & 7 deletions Plugins/PackageToJS/Tests/ExampleTests.swift
Original file line numberDiff line numberDiff line change
Expand Up@@ -297,7 +297,6 @@ extension Trait where Self == ConditionTrait {
}
}

#if compiler(>=6.1)
@Test(.requireSwiftSDK)
func testingWithCoverage() throws {
let swiftSDKID = try #require(Self.getSwiftSDKID())
Expand DownExpand Up@@ -325,7 +324,6 @@ extension Trait where Self == ConditionTrait {
}
}
}
#endif
#endif // compiler(>=6.3)

@Test(.requireSwiftSDK(triple: "wasm32-unknown-wasip1-threads"))
Expand DownExpand Up@@ -379,7 +377,6 @@ extension Trait where Self == ConditionTrait {
}
}

#if compiler(>=6.1)
// TODO: Remove triple restriction once swift-testing is shipped in p1-threads SDK
@Test(.requireSwiftSDK(triple: "wasm32-unknown-wasi"))
func continuationLeakInTest_SwiftTesting() throws {
Expand All@@ -391,8 +388,6 @@ extension Trait where Self == ConditionTrait {
try runSwift(["package", "--disable-sandbox", "--swift-sdk", swiftSDKID, "js", "test"], [:])
}
}
#endif

@Test(.requireSwiftSDK)
func playwrightOnPageLoad_XCTest() throws {
let swiftSDKID = try #require(Self.getSwiftSDKID())
Expand All@@ -413,7 +408,6 @@ extension Trait where Self == ConditionTrait {
}
}

#if compiler(>=6.1)
// TODO: Remove triple restriction once swift-testing is shipped in p1-threads SDK
@Test(.requireSwiftSDK(triple: "wasm32-unknown-wasi"))
func playwrightOnPageLoad_SwiftTesting() throws {
Expand All@@ -434,5 +428,4 @@ extension Trait where Self == ConditionTrait {
)
}
}
#endif
}
4 changes: 4 additions & 0 deletions README.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -120,6 +120,10 @@ Use the [BridgeJS Playground](https://swiftwasm.org/JavaScriptKit/PlayBridgeJS/)

Check out the [examples](https://github.com/swiftwasm/JavaScriptKit/tree/main/Examples) for more detailed usage patterns.

## Minimum Supported Swift Version (MSSV)

The minimum supported Swift version is 6.3.

## Contributing

Contributions are welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to contribute to the project.
Expand Down
8 changes: 3 additions & 5 deletions Sources/JavaScriptEventLoop/JSRemote.swift
Original file line numberDiff line numberDiff line change
Expand Up@@ -62,7 +62,7 @@ extension JSRemote where T == JSObject {
///
/// - Parameter object: The JavaScript object to reference remotely.
public init(_ object: JSObject) {
#if compiler(>=6.1) && _runtime(_multithreaded)
#if _runtime(_multithreaded)
self.init(sourceObject: object, sourceTid: object.ownerTid)
#else
self.init(sourceObject: object, sourceTid: -1)
Expand DownExpand Up@@ -92,7 +92,7 @@ extension JSRemote where T == JSObject {
public func withJSObject<R: Sendable, E: Error>(
_ body: @Sendable @escaping (JSObject) throws(E) -> R
) async throws(E) -> sending R {
#if compiler(>=6.1) && _runtime(_multithreaded)
#if _runtime(_multithreaded)
if storage.sourceTid == swjs_get_worker_thread_id_cached() {
return try body(storage.sourceObject)
}
Expand DownExpand Up@@ -137,13 +137,11 @@ private final class _JSRemoteContext: @unchecked Sendable {
}
}

#if compiler(>=6.1)
@_expose(wasm, "swjs_invoke_remote_jsobject_body")
@_cdecl("swjs_invoke_remote_jsobject_body")
#endif
@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
func _swjs_invoke_remote_jsobject_body(_ contextPtr: UnsafeRawPointer?) -> Bool {
#if compiler(>=6.1) && _runtime(_multithreaded)
#if _runtime(_multithreaded)
guard let contextPtr else { return true }
let context = Unmanaged<_JSRemoteContext>.fromOpaque(contextPtr).takeRetainedValue()

Expand Down
Loading
Loading