File tree Expand file tree Collapse file tree 4 files changed +9
-20
lines changed Expand file tree Collapse file tree 4 files changed +9
-20
lines changed Original file line number Diff line number Diff line change 1010 uses : swiftlang/github-workflows/.github/workflows/swift_package_test.yml@main
1111 with :
1212 enable_embedded_wasm_sdk_build : true
13+ wasm_exclude_swift_versions : ' [{"swift_version": "nightly-6.2"}]'
1314 enable_linux_checks : false
1415 enable_macos_checks : false
1516 enable_windows_checks : false
2829 name : Build WebGPU Demo
2930 uses : swiftlang/github-workflows/.github/workflows/swift_package_test.yml@main
3031 with :
31- enable_embedded_wasm_sdk_build : true
3232 wasm_exclude_swift_versions : ' [{"swift_version": "nightly-6.2"}]'
3333 enable_linux_checks : false
3434 enable_macos_checks : false
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ let package = Package(
1111 ) ,
1212 . package (
1313 url: " https://github.com/swiftwasm/JavaScriptKit.git " ,
14- from : " 0.33.1 " ,
14+ revision : " 0b785610d170a0cbb4777ea379cb7221fc82c401 " ,
1515 ) ,
1616 ] ,
1717 targets: [
Original file line number Diff line number Diff line change 11# WebGPU Example
22
3- Install Swift 6.2 development snapshot and Swift SDK for Wasm by following
4- https://www.swift.org/documentation/articles/wasm-getting-started.html .
3+ Install Swift 6.2 (or later version) and a corresponding Swift SDK for Wasm by following
4+ [ "Getting Started with Swift SDKs for WebAssembly" article ] ( https://www.swift.org/documentation/articles/wasm-getting-started.html ) .
55
66Build with the installed Swift SDK using JavaScriptKit's ` PackageToJSPlugin ` plugin. Make sure to update
7- the Swift SDK in the following command to the version that matches your installed swift.org toolchain.
7+ the Swift SDK in the following command to the version that matches your installed Swift toolchain.
88```
9- swift package --swift-sdk swift-6.2-DEVELOPMENT-SNAPSHOT-2025-06-17-a_wasm js --use-cdn
9+ swift package --swift-sdk swift-6.2-RELEASE_wasm js --use-cdn
1010```
1111
12- If you'd like to produce a smaller binary (under 400 kB), you'll have to use
13- ` swift-DEVELOPMENT-SNAPSHOT-2025-08-11 ` or later development snapshot of the ` main ` Swift toolchain
14- branch. Earlier versions (including Swift 6.2) have no support for ` async ` functions in Embedded Swift,
15- which is required for WebGPU setup. Use the following command to build with Embedded Swift (update for
16- your installed toolchain version if needed):
17-
18- ```
19- swift package --swift-sdk swift-DEVELOPMENT-SNAPSHOT-2025-08-11-a_wasm-embedded js --use-cdn -c release
20- ```
21-
22- WebGPU is enabled by default in beta and technical preview versions of Safari. Safari 17 and 18 require enabling
12+ WebGPU is enabled by default in Safari 26. Safari 17 and 18 require enabling
2313WebGPU feature flag as shown on the screenshot:
2414
2515<img width =" 833 " alt =" Safari Feature Flags settings tab with WebGPU enabled " src =" https://github.com/user-attachments/assets/7d0453ab-da51-4a6e-85da-dc466cf775be " />
You can’t perform that action at this time.
0 commit comments